I'm trying to do this with google as a learning example : https://pastebin.com/yj8gMeap
` HtmlPage htmlPage = null;
try(final WebClient webClient = new WebClient(BrowserVersion.CHROME))
{
webClient.getOptions().setJavaScriptEnabled(true);
webClient.getOptions().setThrowExceptionOnScriptError(false);
webClient.getOptions().setCssEnabled(false);
webClient.setAjaxController(new NicelyResynchronizingAjaxController());
htmlPage = webClient.getPage("https://www.google.com/");
}
HtmlPage clickPage = htmlPage.getElementById("gbqfbb").click();
clickPage.save(new File("src/test/resources/clickPage"));
System.out.println("PAGE ON CLICK : "+ clickPage.getUrl()); //Does not get the Im feeling
//lucky page, simply stays as the original google page`
But the click is not returning the clicked page, instead its just returning the base page, I'm trying to follow the pages of what is clicked. E.g. clicking "I'm feeling lucky" and then getting that page.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too