<tr><td class=wb><a href="javascript:void(fight())" style='text-decoration:none'><b>Click here!</a></td></tr>
你好,怎么点击这个网址?
<tr><td class=wb><a href="javascript:void(fight())" style='text-decoration:none'><b>Click here!</a></td></tr>
你好,怎么点击这个网址?
我会使用:
driver.find_element_by_link_text("Click here!").click()
我不确定,但试试这个:
elements = driver.find_elements_by_tag_name("td")
for element in elements:
if element.text == "Click here!":
element.click()
或者:
elements = find_elements_by_class_name("wb")
for element in elements:
if element.text == "Click here!":
element.click()