driver.find_element_by_xpath () when writing parameters

Is assumed to be located below the Elements, and the text "1234567890" corresponding to the parameters cluster_name:

<td  class="xxxx-body">1234567890</td>

 

DETAILED targeting as follows:

driver.find_element_by_xpath("//td[contains(text(),'%s')]" % cluster_name)

Guess you like

Origin www.cnblogs.com/jjstrip/p/11764728.html