Regarding clicking on the hyperlink and button using the HtmlUnit driver in a java application

I am trying to click the hyperlinks and buttons of a webpage using the HtmlUnit driver in Java, but I have failed. What code should I write in java to perform such an operation

Please help me

+3
source share
1 answer

Hi, maybe you can post the source code and possible error messages.

Getting started and much more:

http://htmlunit.sourceforge.net/gettingStarted.html

Do you have something like this ?:

final WebClient webClient = new WebClient();
final HtmlPage page = webClient.getPage("http://htmlunit.sourceforge.net");
page.getLinkWith("LinkName"), click()
0
source

Source: https://habr.com/ru/post/1783799/


All Articles