My javascript line:
$('#name').show();
My webdriver code line:
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("name"))).sendKeys("Some Name");
When I run the test it throws the following exception:
WebDriverException: unknown error: cannot focus element
So, I have been searching for a solution. There are some issues reported in chromium google code site. There are a lot of suggestions for using JavaScriptExecutor. But it doesn't seem a better solution for me, because it could make a browser-dependent code.