I am trying to check if an element is focused using selenium webdriver in protractor. This is before loading AngularJS, so I need to use the driver as shown here:
var ptor = protractor.getInstance(),
driver = ptor.driver;
I also need to know how to do the test until the input is focused. I need to wait until the model is launched, so the input will not be focused for half a second, as shown here:
window.setTimeout(function(){
$("input#email").focus();
}, 500);
Any idea how to check if input has focus after 500ms?
source
share