Menu

#117 Support for Multiple Forms in NUnitAsp

open
nobody
All (27)
5
2009-06-08
2009-06-08
KKhaitan
No

I have been using NUnit framework and its extensions (NUnitAsp and
NUnitForms) from the past few weeks. I have now hit a stopping point where
Im not being able to resolve an issue. It would be great if you could throw
some light into it.

I have a website coded in C# using .NET framework 3.5. I am writing test
scripts for it in NUnit. Ill explain the scenario.

I have a webpage which has few asp controls like a button and a few text
boxes. On clicking the button a "window.showModalDialog(....)" event is
fired and a modal dialog box appear which is a separate page altogether but
it disables the parent page from which it was called.
My problem is after accessing the button control in the parent page through
NUnit test scripts I want to access the controls in the modalDialog box.
But im not being able to do so. If I try to use the " CurrentWebForm "
WebFormTestCase it gives me an error saying "The current page has more than
one form. To test it, construct a WebFormTester and use it as the
'container' parameter for your other testers. "

I saw that this error message is given when there is more than one form
being detected in the Class "WebFormTester.cs".
It would be great if you could tell me how to go about accessing the
controls in a modal dialog box. Because from what I gathered the Browser
has a single page with multiple forms when this modal dialog window is
opened. Thus there are two forms in the DOM Tree. But there is no way
through which Im being able to access them.

Thanks,
KKhaitan

Discussion


Log in to post a comment.