简体   繁体   中英

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>

I am using python and selenium to automate a web report. I tried different find_element_by options but none worked.

In this scenario, I am trying move from Dashboard to Transactions.

enter image description here

driver.find_element_by_xpath('//a[contains(@href,"https://commerce.spscommerce.com/fulfillment/transactions/list/")]')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM