lundi 27 avril 2015

NoSuchElementError when element is actually there

I have this line in one of my angular tests:

element(by.id('male')).click();

And the test is failing with this message:

NoSuchElementError: No element found using locator: By.id("male")

But when I add browser.sleep() to the test I can see that there's #male element on the page.

So I tried adding explicit wait and it didn't help. What could be wrong?

Aucun commentaire:

Enregistrer un commentaire