Python+Selenium基础篇之6-元素定位方法

Python+Selenium基础篇之6-元素定位方法,第1张

Python+Selenium基础篇之6-元素定位方法

WebDriver 提供了 8 种元素定位方法,在 Python 中,对应的方法如下:
 id 定位 → find_element_by_id()
 name 定位 → find_element_by_name()
 tag 定位 → find_element_by_tag_name()
 class 定位 → find_element_by_class_name()
 link_text → find_element_by_link_text()
 partial link 定位 → find_element_by_partial_link_text()
 XPath 定位 → find_element_by_xpath()
 CSS_selector 定位 → find_element_by_css_selector()

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5689932.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-12-17
下一篇2022-12-17

发表评论

登录后才能评论

评论列表(0条)

    保存