无法在此页面上单击带有Selenium Python的按钮 link
我的代码
from selenium import webdriver
import bs4
import time
import sys
URL = "https://yandex.ru/sprav/search/chain/108880815285"
driver = webdriver.Firefox()
driver.get(URL)
time.sleep(3)
driver.find_element_by_id("passp-fieldlogin").send_keys("myMail@yandex.ru") # OK
# ERROR
driver.find_element_by_css_selector("What should I inputhere???").click() # ERROR
time.sleep(3)
driver.find_element_by_id("passp-fieldpasswd").send_keys("myPass")
图片
答案 0 :(得分:1)
尝试其中任何一个。
driver.find_element_by_css_selector(".button2_view_classic").click()
OR
driver.find_element_by_css_selector("button.button2_view_classic").click()
答案 1 :(得分:0)