id
driver.find_elenment_by_id("kw")
name
driver.find_element_by_name("kw")
class name
diver.find_element_by_class_name("kw")
tag name
diver.find_element_by_tag_name("kw")
link_text
diver.find_element_by_link_text("kw")
partial_link_text
diver.find_element_by_partial_link_text("kw")
css
driver.find_element_by_css_selector("body > div.main > div.main-container > div.slide.marginB28 > div > ul > li:nth-child(1) > a").click()
xpath
driver.find_element_by_xpath("/html/body/div[6]").click()
时间: 2024-11-06 07:26:51