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();
}