【问题标题】:"you are using an unsupported command-line flag: --ignore-certificate-errors." error displayed in slave while executing selenium script“您正在使用不受支持的命令行标志:--ignore-certificate-errors。”执行 selenium 脚本时在从站中显示错误
【发布时间】:2017-08-23 12:21:21
【问题描述】:

我正在使用 Jenkins 在从机中执行 selenium 脚本,但出现以下错误。

"您正在使用不受支持的命令行标志: --ignore-certificate-errors。”

使用相同的 chromedriver.exe 文件,相同的脚本在我的本地运行良好。请注意,我已将 chromedriver.exe 文件放在脚本启动它的单独文件夹中。

Chrome Version:59.0.3071.115
Selenium Version:2.52.0

【问题讨论】:

  • 你本地的chrome版本也一样吗?还发布您用于启动驱动程序的代码
  • 是的,我本地的 Chrome 版本是一样的。 PFB 代码。 System.setProperty("webdriver.chrome.driver", strChromeDriverPath); TestReport.addStep(tc, "Set ChromeDriver", "Setting ChromeDriver object", "ChromeDriver Set", "ChromeDriver Set", "");返回新的 ChromeDriver();

标签: selenium jenkins selenium-chromedriver


【解决方案1】:
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--test-type");// this is the one that helped
WebDriver driver = new ChromeDriver(chromeOptions);
driver.get("https://www.google.com");

这解决了类似的问题

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-08-11
    • 2014-08-01
    • 2014-09-12
    • 1970-01-01
    • 2014-07-21
    • 2015-11-09
    • 2017-09-14
    • 2017-06-27
    相关资源
    最近更新 更多