Check if WebElement has focus

  • 1 Replies
  • 1093 Views
Check if WebElement has focus
« on: July 19, 2016, 17:26:48 pm »
How to find out if an element has focus?
All I need is a Boolean indication

Re: Check if WebElement has focus
« Reply #1 on: July 20, 2016, 16:07:20 pm »
Try running
Code
element.equals(driver.switchTo().activeElement());

 

Sitemap 1 2 3 4 5 6 7 8