Back
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?
This code snippet will help:
element.equals(driver.switchTo().activeElement());
31k questions
32.8k answers
501 comments
693 users