If you are using
--remote-debugging-port
Try to change the port number. The port number currently used may be occupied.
This error message...
org.openqa.selenium.WebDriverException: 未知錯(cuò)誤: 無法發(fā)現(xiàn)打開的頁面 構(gòu)建信息: 版本: '3.141.59', 修訂版本: 'e82be7d358', 時(shí)間: '2018-11-14T08:17:03' 系統(tǒng)信息: 主機(jī): 'WX-PC123456', IP: '192.168.56.1', 操作系統(tǒng): 'Windows 10', 架構(gòu): 'amd64', 版本: '10.0', Java 版本: '1.8.0_211' 驅(qū)動(dòng)信息: 驅(qū)動(dòng)版本: ChromeDriver 遠(yuǎn)程堆棧跟蹤: 回溯: 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"); # 繞過操作系統(tǒng)安全模型
Python
options.add_argument('--no-sandbox') # 繞過操作系統(tǒng)安全模型