dimanche 13 juin 2021

How to check before actions the xpath available or not?

I want to check xpath available or not. But I don't want to ignore any error.

I want to do like this...

if driver.find_element_by_xpath("your xpath"):

driver.find_element_by_xpath("your xpath").click()

But it's not working! Please help me..

Aucun commentaire:

Enregistrer un commentaire