If the browser window is not in focus, all webdriver identifications on the current page fail.
How can the browser be brought into focus, using webdriver?
((JavascriptExecutor) webDriver).executeScript("window.focus();");
should do the trick!
2.1m questions
2.1m answers
60 comments
57.0k users