2
<li class="paginate_button page-item next" id="tb_next"
<a href="#" aria-controls="tb" data-dt-idx="5" tabindex="0" class="page-link">Seguinte</a>
</li>
Hello friends, I have a page that has this html code and I need to simulate a click on this href, the simulation I already get via webview (javafx)
webEngine.executeScript(
"document.getElementById(\"botão\").click();"
);
But as you can see there is only ID in the parent element and then I am not able to access the href child element.
I tried it like this, but it’s not working:
webEngine.executeScript(
"document.getElementById(\"tb_next\").firstChild.click();"
);
Could someone help me please, I already appreciate any help.
Obg Friends, for the ready help, but would have some solution done in javascript, I do not know why but my program is not able to run Jquery.
– João de Lima
see the error msgs: Typeerror: Document.querySelectorAll("#tb_next > . page-link"). click is not a Function. (In 'Document.querySelectorAll("#tb_next > . page-link"). click()', 'Document.querySelectorAll("#tb_next > . page-link"). click' is Undefined) Typeerror: null is not an Object (evaluating 'Document.querySelector("#tb_next a"). click')
– João de Lima
Friend, my answer does not use jQuery. I believe that the other answer is incorrect.
– Sam