0

Google Chrome 75.0.3770.80 is installed on Docker image on CentOS 7

Chrome driver 75.0.3770.80 is checked-in with the framework

And docker container shows the correct version for both chrome browser and chrome driver, means both are installed successfully.

System.setProperty("webdriver.chrome.driver", System.getProperty("user.dir") + File.separator+"path/chromedriver");

ChromeOptions options = new ChromeOptions();
options.addArguments("--no-sandbox");
options.addArguments("--headless");
options.setExperimentalOption("useAutomationExtension", false);
options.addArguments("disable-infobars"); // disabling infobars
options.addArguments("--disable-extensions"); // disabling extensions
options.addArguments("--disable-gpu"); // applicable to windows os only
options.addArguments("--disable-dev-shm-usage"); // overcome limited resource problems
DesiredCapabilities chromeCapabilities = DesiredCapabilities.chrome();
options.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
options.merge(chromeCapabilities);
driver = new ChromeDriver(options);

Xvfb is set on Container and shows below output:
DISPLAY=:99
root        33    13  0 05:42 ?        00:00:00 Xvfb :99 -screen 0 1920x1920x24

When i try to launch the Chrome browser, it shows

unknown error: DevToolsActivePort file doesn't exist

You can see that the code above has all the options added.

I referred stackoverflow already answered here, but that doesn't seems to be working WebDriverException: unknown error: DevToolsActivePort file doesn't exist while trying to initiate Chrome Browser

vish
  • 901
  • 1
  • 7
  • 20
  • I had similar issues with ubuntu... no idea why but it was not loading properly the injected webdriver. Solved it with https://github.com/bonigarcia/webdrivermanager – Infern0 Jun 13 '19 at 08:20
  • webdrivermanager is also not helping. Even tried below but still no success. Edit the file /opt/google/chrome/google-chrome change as exec -a "$0" "$HERE/chrome" "$@" --user-data-dir ”/root/.config/google-chrome” – vish Jun 13 '19 at 13:12

0 Answers0