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
1条答案
按热度按时间r3i60tvu1#
首先,该按钮没有
id='button'
没有看到该网站,你可以尝试这样做:
或