I have weird issue, it started when company changed system image (both Windows 10) to new version. Basically there is nothing we can do about it, it is a given factor.
Current C# NUnit Selenium ChromeDriver solution ceased to work properly overnight. The only difference seen by user, between both environments is Chrome browser version (but relevant chromedriver version is used in each).
To test what may be the root of the cause I prepared simple code, which is working properly in old environment but is not in new one. (This is for simplicity of issue presentation):
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
namespace testSeleniumNewSystemImage;
public class GoogleTest
{
IWebDriver driver;
[SetUp]
public void startBrowser()
{
ChromeOptions options = new ChromeOptions();
options.AddArgument("no-sandbox");
options.AddArgument("enable-automation");
options.AddArgument("--start-maximized");
driver = new ChromeDriver(options);
}
[Test]
public void test()
{
driver.Url = "https://www.google.com/";
}
[TearDown]
public void closeBrowser()
{
driver.Quit();
}
}
- Google Chrome 110.0.5481.97 (Official Build) (64-bit)
- Selenium.WebDriver.Chromedriver version 110.0.5481.7700 (tried different subversions with the same outcome)
Above test passes OK in old system version, in new one we get following error:
OpenQA.Selenium.WebDriverException : unknown error: Chrome failed to start: exited normally. (unknown error: DevToolsActivePort file doesn't exist) The process started from chrome location C:\Program Files\Google\Chrome\Application\chrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
or similar one when another Chrome option is added:
options.AddArgument("--remote-debugging-port=9222");
OpenQA.Selenium.WebDriverException : unknown error: Chrome failed to start: exited normally. (chrome not reachable) (The process started from chrome location C:\Program Files\Google\Chrome\Application\chrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
I am clueless, tried different other options, without any success. If anyone got across similar issue and could help with this one, would be great. Thank you very much in advance.
Tried different other chrome options, without any success.