I am trying to click on the element MY ACCOUNT:
and the system returns an exception ElementNotInteractableException
I'm using:
- Selenium 3
- Java
- Firefox
- GeckoDriver
My code:
String xpath = "//li[@id='li_myaccount']/a";
try {
WebElement element = driver.findElement(By.xpath(xpath));
element.click();
} catch (Exception e) {
e.printStackTrace();
}
I tried the following things:
- WebDriverWait to wait the element be clickable;
- Javascriptexecutor;
- Actions;
- Change the locator to find by text 'My account'
The system found the element but can't click on the element.
Any workarounds or help given would be greatly appreciated.
Aucun commentaire:
Enregistrer un commentaire