Hello mates! Several days ago, I've ran into issue with Selenium and that is to be exact the error in the title. I have been trying to resolve this issue myself for some days now with no luck at all. Chrome is being run from external file, when I try to open manually, it works. If I try to run the driver from the default location, it works. I've tried different versions of Selenium with no luck and different versions of Chrome.
ChromeDriver will execute chrome.exe.
ChromeDriver fails to start chrome.exe for unknown reason. CLI Picture
ChromeDriver driver = new ChromeDriver(new ChromeOptions { BinaryLocation = Path.Combine(Environment.CurrentDirectory, @"GoogleChromePortable") });
OpenQA.Selenium.WebDriverException
HResult=0x80131500
Message=unknown error: Failed to create Chrome process.
Source=WebDriver
StackTrace:
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeDriverService service, ChromeOptions options, TimeSpan commandTimeout)
at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeOptions options)
at Self_Contained.Program.Main(String[] args) in *:\*\*\SFC\Program.cs:line 11
After hours of research I found somewhere that excluding chrome.exe may lead to this issue. I added chrome.exe to the binary path and voilĂ it is working.
User contributions licensed under CC BY-SA 3.0