Quantcast

Re: [HtmlUnit] Click Ajax Button

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [HtmlUnit] Click Ajax Button

asashour
Hi José,

Please post to the user-list instead.

Any error you get?

Please ensure you use latest HtmlUnit version, and post your complete case (with URL), so others can reproduce the issue.

Thanks,
Ahmed



From: José Lacerda <[hidden email]>
To: [hidden email]
Sent: Monday, March 6, 2017 7:52 PM
Subject: [HtmlUnit] Click Ajax Button

Hello,

I am need help.

- Driver Configured:
 webClient.setAjaxController(new NicelyResynchronizingAjaxController());
 webClient.getOptions().setJavaScriptEnabled(true);
 webClient.getOptions().setThrowExceptionOnScriptError(true);
 webClient.getOptions().setCssEnabled(true);
 
- Navigation is done to this point that I need to click to open a new page:
<a href="#" id="fPP:processosTable:333708:clAP" name="fPP:processosTable:333708:clAP" onclick="A4J.AJAX.Submit('fPP',event,{'similarityGroupingId':'fPP:processosTable:333708:clAP','parameters':{'fPP:processosTable:333708:clAP':'fPP:processosTable:333708:clAP','ajaxSingle':'fPP:processosTable:333708:clAP','idProcessoSelecionado':333708} } );return false;" title="Abrir Paginador"><img src="/pje/img/view.gif" style="cursor:pointer"></a>

- My solution does not get the new page after the click:
formularioSearch = paginaRespostaSearch.getFormByName("fPP");
webClient.waitForBackgroundJavaScript(10000);
            
HtmlAnchor anchor = (HtmlAnchor) paginaRespostaSearch.getElementById("fPP:processosTable:333708:clAP");
webClient.waitForBackgroundJavaScript(10000);
HtmlPage novaAba = anchor.click();
webClient.waitForBackgroundJavaScript(10000);

- What is lack?

--
José Lacerda
(+55) (83) 98700-5885

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user
Loading...