jeudi 28 février 2019

Selenium if locate on screen unable to locate element

I'll keep this question simple: I have an if statement:

if self.driver.find_element_by_xpath('//*[contains(@id, "mission_countdown")]'):

And i get this error:

selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[contains(@id, "mission_countdown")]"}

Why do I get this? I mean its an if statement, IF its on screen

Thanks for helping

Aucun commentaire:

Enregistrer un commentaire