Chrome错误:您使用的是不受支持的命令行标志: – ignore-certifcate-errors。 稳定性和安全性将受到影响

浏览器打开时带有下面提到的行 –

您使用的是不受支持的命令行标志: – ignore-certifcate-errors。 稳定性和安全性将受到影响

以及几秒后浏览器关闭并抛出错误。

我在chrome上运行代码时遇到上述错误。

我正在使用chrome版本–44.0.2403.155和最新的selenium jar。

有人可以帮帮我吗?

对于镀铬版本58.0.3029.110,您应该使用2.2.8版本的Chrome.driver。 然后,您没有收到错误“您正在使用不受支持的命令行标志:–ignore-certifcate-errors。稳定性和安全性将受到影响。”

我已经解决了很多问题以解决这个问题并最终得到解决方案。 要解决Chrome v58的问题,请从此处下载驱动程序。 http://chromedriver.storage.googleapis.com/index.html?path=2.28/如果您想下载其他chromedriver版本,然后更改上述url中的版本号,您将获得所需的驱动程序。 祝你好运。

我最近有这个问题。 我发现我使用的是32位chromedriver,用于64位Mac。 所以我只是用https://chromedriver.storage.googleapis.com/index.html?path=2.25/中的64位chromedriver替换了chromedriver,错误消失了。

我可以通过打开Chrome快捷方式的属性在Windows上解决此问题。 在那里我删除了–ignore-certificate-errors标志。

创建驱动程序时尝试此代码。 我希望它会有所帮助:

DesiredCapabilities capabilities = DesiredCapabilities.chrome(); ChromeOptions options = new ChromeOptions(); setDefaultCapabilities(capabilities); capabilities.setCapability("chrome.switches", Arrays.asList("--ignore-certificate-errors")); options.addArguments(Arrays.asList("allow-running-insecure-content", "ignore-certificate-errors")); capabilities.setCapability(ChromeOptions.CAPABILITY, options); 

您可以将其添加到目标部分中Chrome浏览器的快捷方式:

 –test-type 

这将禁用任何警告消息。 不是最好的解决方案,但它确实有效。

从路径http://chromedriver.storage.googleapis.com/index.html?path=2.12/使用chromedriver 2.12版本(chromedriver_win32.zip)

你不会看到这个弹出窗口。

如果您的浏览器是最新版本,请使用最新的Chrome驱动程序。 我遇到了同样的问题,但是当它改为最新的驱动程序时它就有效了。

我认为这是由于Chrome驱动程序与Chrome浏览器不兼容。 1.卸载chrome驱动程序。 2.检查您正在使用的Chrome浏览器版本。 3.找到相应的兼容Chrome驱动程序(兼容浏览器版本)并安装它。 不要忘记在步骤1和步骤3之后重新启动系统。我认为这应该可以解决问题。 它对我有用。