2

I install Ubuntu 18.04 under VM. My setup:

  • Selenium : 3.12
  • Java: 1.8
  • Chromedriver: 2.40
  • Chrome browser version: 68.0

It's Maven project. When start maven from console everything is OK. When use the same code with same command in Jenkins I get this error:

org.openqa.selenium.WebDriverException: unknown error: DevToolsActivePort file doesn't exist 
(Driver info: chromedriver=2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7),platform=Linux 4.15.0-29-generic x86_64) (WARNING: The server did not provide any stacktrace information)

I try various options

 System.setProperty("webdriver.chrome.driver", chromeDriverLinux);
            ChromeOptions options = new ChromeOptions();
            options.addArguments("disable-infobars");
            options.addArguments("--disable-browser-side-navigation");
            options.addArguments("--start-maximized");
            options.addArguments("--no-sandbox");
            options.addArguments("--disable-dev-shm-usage");
            options.setExperimentalOption("useAutomationExtension", false);

but none of them helps.

user35322
  • 23
  • 1
  • 5
  • try this https://stackoverflow.com/questions/50642308/org-openqa-selenium-webdriverexception-unknown-error-devtoolsactiveport-file-d – murali selenium Jul 27 '18 at 11:07
  • I totally missed `--headless` option. Now it's fine but I think it's not permanently solution. :/ In this case I need different configurations for tests development, Jenkins etc. – user35322 Jul 27 '18 at 11:51

0 Answers0