關於selenium的8種元素定位

selenium中有八種元素定位,分別是:id,name,class_name,tag_name,link_text、partial_link_text、xpath、css 簡單的定位可以用 id、name、class_name、tag_name等,如果遇到複雜的元素需要定位則要使用xpath、或者css定位 下面是每種定位的用法——拿百度來說 1、id——定位到百度的輸入框,可以看到百度的輸入框
相關文章
相關標籤/搜索