TestProject Forum
Powered by leading experts in the test automation community

Check if WebElement has focus

How to find out if an element has focus?
All I need is a Boolean indication

Try running

element.equals(driver.switchTo().activeElement());