小编Huu*_*Quy的帖子

TypeError: WebDriver.__init__() 在 Selenium Python 中得到了意外的关键字参数“executable_path”

我的代码:

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

option = webdriver.ChromeOptions()
driver = webdriver.Chrome(executable_path='./chromedriver.exe', options=option)

driver.get('https://www.google.com/')
Run Code Online (Sandbox Code Playgroud)

输出:

WebDriver.__init__() got an unexpected keyword argument 'executable_path'
Run Code Online (Sandbox Code Playgroud)

我正在尝试创建一个脚本来登录网站。当我尝试运行此脚本时,它给出了以下错误: WebDriver.__init__() got an unexpected keyword argument 'executable_path'

python-3.x selenium-chromedriver selenium-webdriver

40
推荐指数
2
解决办法
12万
查看次数