[英]click button in python selenium
首先那個按鈕沒有id='button'
在沒有看到網站的情況下,您可以嘗試執行以下操作:
login_button = driver.find_element(By.TAG_NAME, 'button')
login_button.click() # this assumes that there are no other buttons on the page as find_element finds the first button on the page
要么
login_button = driver.find_element(By.CLASS_NAME, 'btn')
login_button.click() # this assumes that there are no other elements with the `btn` class to click
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.