WebElement element = driver.findElement(By.className("nav-action-button"));
Actions actions = new Actions(driver);
try {
JavascriptExecutor js = (JavascriptExecutor)driver;
js.executeScript("arguments[0].scrollIntoView(true);", element);
actions.moveToElement(element).perform();
actions.click(element).perform();
} catch (Exception e) {
// throw new TestException(String.format("The following element is not clickable: [%s]", element.toString()));
}
I have also tried
WebElement element = driver.findElement(By.id("nav-your-amazon"));
Actions actions = new Actions(driver);
try {
JavascriptExecutor js = (JavascriptExecutor)driver;
js.executeScript("arguments[0].scrollIntoView(true);", element);
actions.moveToElement(element).perform();
actions.click(element).perform();
} catch (Exception e) {
// throw new TestException(String.format("The following element is not clickable: [%s]", element.toString()));
}