def 进入上传页面(self):
A=self.web.find_element(By.CLASS_NAME,'sc_btn')
A.click()
元素可以识别,但是元素无法被点击。怎么解决这个问题,是配置的问题吗?
Chromedriver版本和浏览器版本不一致吧,下载一个最新的Chromedriver就行了。
下载地址:http://chromedriver.storage.googleapis.com/index.html
先确定一下浏览器版本和Chromedriver版本是否一致,然后执行下面代码试试
from selenium import webdriver
from selenium.webdriver.common.by import By
import time
browser = webdriver.Chrome()
browser.get('https://www.docin.com/')
time.sleep(3)
browser.find_element(By.CLASS_NAME,'sc_btn').click()
print('aaa')