我怎样才能点击这里的链接使用id.class.hrefpython selenium,我使用pyCharm*href是可变的
我尽力了
driver.find_element_by_xpath("//div[@id='result_26']//a[@class='a-link-normal s-access-detail-page s-color-twister-title-link a-text-normal']/@href").click()
enter image description here
Tags:
您单击的是href属性而不是
<a>
标记。在假设您的xpath是正确的,只需从末尾删除
/@href
,它就可以理想地工作了。在相关问题 更多 >
编程相关推荐