未知错误:Chrome无法启动:在Jenkins中异常退出(未知错误:DevToolsActivePort文件不存在)

时间:2019-08-12 16:14:44

标签: selenium jenkins selenium-webdriver

尝试在jenkins机器(Linux服务器)上运行时,出现异常。我尝试了其他方法,但找不到根本原因,将不胜感激。

我正在使用Selenium Java:2.46.0, ChromeDriver 76.0.3809.68

错误:

org.openqa.selenium.WebDriverException: 
unknown error: Chrome failed to start: exited abnormally
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /jenkins/workspace/et-automation-regression/resources/drivers/linux/chromedriver is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

我正在通过Jenkins在linux服务器上运行此套件。

        final ChromeOptions chromeOptions = new ChromeOptions();
        chromeOptions.setBinary(System.getProperty("user.dir") + "/resources/drivers/linux/chromedriver");

        chromeOptions.addArguments("--headless");
        chromeOptions.addArguments("--disable-dev-shm-usage");
        chromeOptions.addArguments("start-maximized");
        chromeOptions.addArguments("disable-infobars");
        chromeOptions.addArguments("--disable-extensions");
        chromeOptions.addArguments("--no-sandbox");
        webDriver = new ChromeDriver(chromeOptions);

0 个答案:

没有答案