vendredi 2 novembre 2018

selenium following element python

I'm using selenium with python. I have some element that is a checkbox, and I want to click on it. My problem is with getting that element, I have only the text In my case <td>xxxxx</td> and I want to get the element above it (the previous element, he is not is father, they are only adjacent) I tried this:

driver.find_element_by_xpath("//input[@type='checkbox']/following::td[text()='xxxxx']").click()

but it didn't work.

enter image description here




Aucun commentaire:

Enregistrer un commentaire