如何在 C# 中單擊 selenium 中的此特定按鈕
我嘗試了 a 標簽,但它不起作用
<a class="btn-primary" href="http://myjunkyard.co.za/confirm" itemprop="url" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 16px; color: #FFF; text-decoration: none; line-height: 2em; font-weight: bold; text-align: center; cursor: pointer; display: inline-block; border-radius: 30px; background-color: #201D19; margin: 0; padding: 5px 30px;" target="_blank">Confirm email address</a>
uj5u.com熱心網友回復:
您可以嘗試使用此 XPath 定位此元素:
"//a[contains(@href,'http://myjunkyard.co.za/confirm')]"
或這個
"//a[text()='Confirm email address']"
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/406763.html
標籤:
上一篇:無法單擊使用Pythonselenium并出現錯誤ElementNotInteractableException的按鈕
