![](/img/trans.png)
[英]How to randomly select and click on element with selenium webdriver (Python)?
[英]Selenium Webdriver Python - how to click the right number in randomly changed JS buttons?
您可以使用 xpath 通過文本獲取元素:
password = "01234"
for n in password:
driver.find_element(By.XPATH, f'//td[@class="chiffre" and .="{n}"]').click()
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.