jwebunit 1.2
httpUnit 1.6
I have an application what has 3 frames. One of the frames sometimes has a HEADER
refresh. The user navigates to a page, but this page takes a long time to create, so
they get a message like 'Please wait, loading', followed by a refresh and if the
server has finished creating the real data the real data is displayed and the refresh
cycle ends.
I tried testing this just with the httpUnit header refresh (all options switched on),
but i never got the final page.
I managed to make it work using some code as shown below - I sort of force a recheck.
The problem I have is that I am now unable to use other frames
(com.meterware.httpunit.NoSuchFrameException: No frame named ButtonFrame is currently
active) , presumably because I have a new response. Is there a way round this? Can I
force my new response back into the jwebUnit world?
Thanks
Paul
getTester().gotoFrame("ContentFrame") ;
while ( dataNotFound) {
String currentPageURL = getTester().getDialog().getResponse().getURL().toString();
System.out.println(myThread + " URL of contentframe is: " + currentPageURL );
WebResponse response = getTester().getDialog().getWebClient().getResponse(
currentPageURL);
if ( response.getText().indexOf("Loading" )==-1 )
dataNotFound = false;
else
Thread.sleep(1000);
end
}
getTester().gotoFrame("AnotherFrame") ; <-- Exception here
com.meterware.httpunit.NoSuchFrameException
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Jwebunit-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users