P粉2310799762023-08-26 09:19:59
If you are using
--remote-debugging-port
Try to change the port number. The port number currently used may be occupied.
P粉7926739582023-08-26 00:33:28
This error message...
org.openqa.selenium.WebDriverException: 未知错误: 无法发现打开的页面 构建信息: 版本: '3.141.59', 修订版本: 'e82be7d358', 时间: '2018-11-14T08:17:03' 系统信息: 主机: 'WX-PC123456', IP: '192.168.56.1', 操作系统: 'Windows 10', 架构: 'amd64', 版本: '10.0', Java 版本: '1.8.0_211' 驱动信息: 驱动版本: ChromeDriver 远程堆栈跟踪: 回溯: Ordinal0 [0x013A0C83+1707139]
...means ChromeDriver cannot initialize/generate a new browsing context, i.e. Chrome Browser session.
It seems that the problem lies in the security feature of ChromeDriver, namely sandboxing. To bypass this feature, you can use the following parameters:
--no-sandbox
So your valid code block would be:
Java
options.addArguments("--no-sandbox"); # 绕过操作系统安全模型
Python
options.add_argument('--no-sandbox') # 绕过操作系统安全模型