I am trying to get all the main links, then click on them and navigation to the page:
WebClient client = new WebClient();
HtmlPage page = client.getPage(url);
// Get all links with a href of www.example.com/pages/1_
List<HtmlAnchor> links = (List<HtmlAnchor>) page.getByXPath("//a[href= www.example.com/pages/1_* ");
links[0].click();
After calling click, does it return a HtmlPage? (The NetBeans documentation is not telling me.)
Does the XPath expression look OK?