<tr><td class=wb><a href="javascript:void(fight())" style='text-decoration:none'><b>Click here!</a></td></tr>
您好,如何点击此网址?
答案 0 :(得分:1)
我用过:
driver.find_element_by_link_text("Click here!").click()
答案 1 :(得分:0)
我不确定,但试试这个:
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()