Update: This is not a duplicate qns as none of the solutions at Selenium: WebDriverException:Chrome failed to start: crashed as google-chrome is no longer running so ChromeDriver is assuming that Chrome has crashed worked for me
I had my Java application packaged as a runnable JAR for running Selenium tests.
Previously, I had an error when starting the application, "Failed to create a Chrome process", however I had it "resolved" (or so I believe...) after following the solution in this thread
However, I am facing another error now,
Chrome failed to start: Crashed
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location ..... is no longer running, so ChromeDriver is assuming that Chrome has crashed)
Here's a snippet of my code and options used.
System.setProperty("webdriver.chrome.driver", "C:\\.......\\chromedriver.exe");
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("useAutomationExtension", false);
options.setBinary("C:\\.......\\chrome.exe");
options.addArguments("--disable-dev-shm-usage");
options.addArguments("start-maximized");
options.addArguments("disable-infobars");
options.addArguments("--disable-extensions");
options.addArguments("--disable-gpu");
options.addArguments("--no-sandbox");
browser = new ChromeDriver(options);
What else could I be missing?
More details
- Using combination of chromedriver.exe (76.0.3809.126) and chrome.exe (76.0.3809.132)
- Selenium 3.141.59
Works when running from eclipse on development pc
Hope to hear from you guys soon. thanks!