Search code examples
c#visual-studioselenium-webdriverselenium-chromedriver

Unable to obtain chrome using Selenium Manager


If I execute the Selenium Manager from CMD (same app folder) it shows everything fine:

windows> ./selenium-manager --browser chrome
[2024-02-28T22:36:35.504Z INFO ] Driver path: C:\Temp\Selenium\chromedriver.exe
[2024-02-28T22:36:35.504Z INFO ] Browser path: C:\Program Files\Google\Chrome\Application\chrome.exe

But if I run my application in the Visual Studio, I get this error:

IWebDriver driver = new ChromeDriver();

OpenQA.Selenium.NoSuchDriverException: 'Unable to obtain chrome using Selenium Manager; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location'

WebDriverException: Selenium Manager process exited abnormally with 69 code: D:\App\bin\Debug\net8.0\selenium-manager\windows\selenium-manager.exe --browser "chrome" --language-binding csharp --output json Standard Output >> { "logs": [ { "level": "ERROR", "timestamp": 1709160132, "message": "Driver unavailable: Driver path: " } ], "result": { "code": 69, "message": "Driver unavailable: Driver path: ", "driver_path": "", "browser_path": "" } }

There's a lot of topics related to the same issue but without solutioun. Does anyone know how to solve it?

Thank you in advance.


Solution

  • After uninstalling and installing Chrome WebBrowser I deleted the chromedriver.exe in my project folder and it worked.