Menu

#75 Javascript execution

open
nobody
None
5
2005-01-24
2005-01-24
No

Hi Guys,
it's me again. I've implemented a tester for
BaseValidator class & RequiredFieldValidator.

I can't find a way to enable Javascript for the Client-
side support of the validators.

Is it also possible in NUnit or NUnitAsp to configure it to
only test methods that are not inherited?

Discussion

  • James Little

    James Little - 2005-01-25

    Logged In: YES
    user_id=499667

    I don't understand your question. Please post to the
    nunitasp-devl@lists.sourceforge.net mailing list.

     
  • Naeem S.

    Naeem S. - 2005-04-07

    Logged In: YES
    user_id=1121564

    Hello,

    I've been thinking about the same thing. But realised that
    you can't execute javascript on a page when calling it using
    NUnitASP.

    Javascript is typically executed by a Browser (IE, Mozilla,
    etc..). Therefore your client-side validators will never be
    executed in your test suite.

    It would be useful if anyone knew of an engine that could be
    added to NUnitASP to execute javascript, testing controls
    with autopostback would be a doddle.

     
  • Nobody/Anonymous

    Logged In: NO

    Client Side validation works in nunit
    try this

    ValidationSummaryTester valsum;

    [Test]
    public void TestNoName()
    {
    Browser.GetPage(mypage);

    btnlogon.Click();

    AssertVisibility(valsum, true);
    AssertEquals(valsum.Messages[0].ToString(), "Password required.");
    AssertEquals(valsum.Messages[1].ToString(), "Username required.");
    AssertEquals(valsum.Messages[2].ToString(), "Password 2 required.");
    }

    Cheers!

     

Log in to post a comment.