编写一个简单的 selenium 脚本来单击网站上的链接。脚本是这样写的:
from selenium import webdriver
import time
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--disable-gpu")
browser = webdriver.Chrome(options=chrome_options)
try:
browser.get("https://www.google.com")
print("Page title was '{}'".format(browser.title))
finally:
browser.quit()
Run Code Online (Sandbox Code Playgroud)
现在的问题是实际的 chrome 驱动程序本身我得到以下异常
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 94
Current browser version is 93.0.4577.82 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Run Code Online (Sandbox Code Playgroud)
我去了 chromedriver 下载网站。但我仍然遇到同样的错误。
兼容性问题。
您的chrome driver版本是94.0.4606.41并且该driver版本支持Chrome browser 94
请执行以下任一操作。
chrome browser为94driver为(从此处93下载版本https://chromedriver.storage.googleapis.com/index.html?path=93.0.4577.63/)93| 归档时间: |
|
| 查看次数: |
39062 次 |
| 最近记录: |