![](/img/trans.png)
[英]How to click the element with href attribute using Python Selenium
[英]How to click on element including href attribute using selenium and python
<a ng-click="pageNavCtrl.executeCallback(item.callback, item.callbackArgs, $event)" ng-href="https://commerce.spscommerce.com/fulfillment/transactions/list/" translate-attr-title="fulfillment.pageNavLink.transactions" translate="fulfillment.pageNavLink.transactions" translate-default="Transactions" href="https://commerce.spscommerce.com/fulfillment/transactions/list/" title="Transactions"><span>Transactions</span></a>
我正在使用 python 和 selenium 来自动化 web 报告。 我尝试了不同的 find_element_by 选项,但都没有奏效。
在这种情况下,我正在尝试从仪表板转移到事务。
driver.find_element_by_xpath('//a[contains(@href,"https://commerce.spscommerce.com/fulfillment/transactions/list/")]')
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.