Below is simple snippet of code:
@FindBy(className = "element-to-press") private WebElement elementToPress; // some other code Keys move = Keys.ARROW_DOWN; gridContainer.sendKeys(move);
In Firefox everything works fine.
In Chrome I've got
"org.openqa.selenium.WebDriverException: unknown error: cannot focus element" error
Safari does not react for
Also I've tried to use another approach:
Keys move = Keys.ARROW_DOWN; Actions actions = new Actions(driver); actions.moveToElement(element).click(); // to focus on element actions.sendKeys(move).perform();
This code fixed Chrome's
"cannot focus element" error, but browser still does not react for
Safari and Firefox do not react for
sendKeys() as well.
I cannot understand what is going on and how I can make my code run for all this browsers.
OS X 10.9.5
Latest version of Chrome/Safari/Firefox
Selenium version 2.44.0