Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/285.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用selenium和python单击包含href属性的元素_Python_Selenium - Fatal编程技术网

如何使用selenium和python单击包含href属性的元素

如何使用selenium和python单击包含href属性的元素,python,selenium,Python,Selenium,请阅读并更新您的问题。谢谢。我尝试了xpath,但收到“selenium.common.exceptions.NoSuchElementException:消息:没有这样的元素:无法定位元素”错误。我尝试添加driver.implicity\u wait,但不起作用。 driver.find_element_by_xpath('//a[contains(@href,"https://commerce.spscommerce.com/fulfillment/transactions/li


请阅读并更新您的问题。谢谢。我尝试了xpath,但收到“selenium.common.exceptions.NoSuchElementException:消息:没有这样的元素:无法定位元素”错误。我尝试添加driver.implicity\u wait,但不起作用。
driver.find_element_by_xpath('//a[contains(@href,"https://commerce.spscommerce.com/fulfillment/transactions/list/")]')