八种元素定位方法及对应的python方法
WebDriver元素定位方式 | 对应的python方法 |
---|---|
id | find_element_by_id() |
name | find_element_by_name() |
class name | find_element_by_class_name() |
tag name | find_element_by_tag_name() |
link text | find_element_by_link_text() |
partial link text | find_element_by_partial_link_text() |
xpath | find_element_by_xpath() |
css selector | find_element_by_css_selector() |