Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19.7k points)

I was expecting something like WebElement.isfocus(), something really simple, but the only approach I found is using the

:focus 

pseudo-class.

Is this really such an uncommon task as for not find tons of information?

Does anyone know some workaround?

1 Answer

0 votes
by (62.9k points)

This code snippet will help:

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

Browse Categories

...