python selenium中如何查找定位动态id及class元素?例如这样的
<div id="btn-attention_2030295">...</div>
网友回复
xpath中提供了3个非常好的方法来为我们定位部份属性值:
driver.find_element_by_xpath("//div[contains(@id, 'btn-attention')]") driver.find_element_by_xpath("//div[starts-...
点击查看剩余70%
python selenium中如何查找定位动态id及class元素?例如这样的
<div id="btn-attention_2030295">...</div>
网友回复
xpath中提供了3个非常好的方法来为我们定位部份属性值:
driver.find_element_by_xpath("//div[contains(@id, 'btn-attention')]") driver.find_element_by_xpath("//div[starts-...
点击查看剩余70%