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