From: Ronald B. <rb...@rb...> - 2022-07-04 13:11:40
|
Hi Jochen, great to hear that HtmlUnit is useful for you. In general it is better to open an issue on github because otherwise i might loose sometimes the focus for some topics. I have used HtmlUnit (as foundation of Wetator (www.wetator.org) for years to test many different jsf applications, so there is some hope to get it working. Not sure what really happened behind your redirecting popup, i guess tis is some kind of async waiting for the server. The get method is synchronous. If the page is later on replaced by another one (changing the location via js) you will not notive this even if your code waits some time. You java code still looks at the old one. The sokutin her is to use the window, this is still there but the page inside gets replaced. You can try something like page.getEnclosingWindow().getEnclosedPage() after some wait. This will give you access to the current page. There are other option but maybe we can start with this. Please open an issue an we will see how we can proceed here. RBRi Am 4. Juli 2022 13:19:56 MESZ schrieb Jochen van Waasen <jo...@va...>: >Hi > >I am using HTMLUnit and got everything I needed working so far. >Now I am stuck with an old JSF application that uses some JavaScript with a redirect popup to load content. > >When I load that page the only result I get is the redirect popup (HTML content) but not the updated page (in the browser it has a different URL). > >I have this: >webClient.options.isCssEnabled = true >webClient.options.isJavaScriptEnabled = true >webClient.isRedirectEnabled = true >webClient.cookieManager.isCookiesEnabled = true >webClient.ajaxController = NicelyResynchronizingAjaxController() > >var thePage : HtmlPage = webClient.get(“someInternalUrl/…/entryPoint.xhtml?targetId=someId”) > >The redirect is working (as mentioned I get the content of the redirect HTML popup). > >In the browser I end up with an URL like this: >https://someInternalUrl/…/resultOverview.xhtml > >How can I verify that this resultOverview.xhtml is loaded (it is in a browser)? >How can I tell HTMLunit to update the page with it? > >Best Regards >Jochen > > > >_______________________________________________ >Htmlunit-user mailing list >Htm...@li... >https://lists.sourceforge.net/lists/listinfo/htmlunit-user |