1

It does not click element in HtmlUnit but works fine on Firefox. for the link Link

and the element //*[@align="right"]/a. The htnmlunit finds the element anchor tag but the tag does not contain href. It clicks the element but does not visit next page.

cbean.setDriver(new HtmlUnitDriver(BrowserVersion.FIREFOX_38));

the driver

List<WebElement> wele = driver.findElements(By.xpath("//*[@align="right"]/a"));
if(wele.size()>0)
{
    wele.get(0).click();
}
AutomatedOrder
  • 501
  • 4
  • 14
Afroz Shaikh
  • 362
  • 4
  • 18
  • Please `wait` as hinted in http://htmlunit.sourceforge.net/faq.html#AJAXDoesNotWork, also make sure you use latest version, and post your complete code. – Ahmed Ashour Oct 16 '15 at 12:46

0 Answers0