undetected-chromedriver - 未检测到的 chromedriver 无法与 selenium 4.10 一起使用

标签 undetected-chromedriver selenium4 executable-path

刚刚升级到 selenium 4.10 并得到: 类型错误:init() 获得意外的关键字参数“executable_path”

我读到最新版本不需要可执行路径,修复方法是:

from selenium.webdriver.chrome.service import Service
service = Service("C:\\Users\\user1\\documents\\selenium\\chromedriver.exe")
self.driver = webdriver.Chrome(service=service)

这工作正常,但是当我使用未检测到的 chromedriver 尝试相同的操作时,我收到原始错误

from selenium.webdriver.chrome.service import Service
service = Service("C:\\Users\\user1\\documents\\selenium\\chromedriver.exe")
self.driver = uc.Chrome(service=service, use_subprocess=True)

File "C:\python38\lib\site-packages\undetected_chromedriver\__init__.py", line 453, in __init__
super(Chrome, self).__init__(
TypeError: __init__() got an unexpected keyword argument 'executable_path'`

最佳答案

我对 python 也有同样的问题。 Selnium 4.10 似乎有问题。请使用selenium 4.9。

关于undetected-chromedriver - 未检测到的 chromedriver 无法与 selenium 4.10 一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76429956/

相关文章:

python - 使用 unDetected_chromedriver 时出现运行时错误

docker - 从浏览器查看 Selenium 网格时,当从 docker 使用集线器和节点时,看不到 Selenium 网格正在运行

java - org.openqa.selenium.NoSuchSessionException : Session ID is null. 调用 quit() 后使用 WebDriver?通过 Java 使用 ChromeDriver Selenium 时出错

python-3.x - Cloudflare 和 Chromedriver - cloudflare 区分 chromedriver 和正版 chrome?

python - 如何使用未检测到的 chromedriver 单击弹出元素

selenium-webdriver - 未检测到的 Chromedriver 替代方案

selenium - 获取 selenium4 网格中单个 session ID 的节点 IP 地址

python - 如何解决 "dyld: Library not loaded: @executable_path.."错误

c# - 确定 Clickonce 应用程序在 Clickonce 缓存中的位置

macos - 在使用 dlopen() 加载的 DLL 中覆盖 @executable_path