Javascript execution
Brought to you by:
jlittle82
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?
Logged In: YES
user_id=499667
I don't understand your question. Please post to the
nunitasp-devl@lists.sourceforge.net mailing list.
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.
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!