selenium: [🐛 Bug]: Unable to launch browser even after using Selenium 4.13 in a C# project

What happened?

I upgraded my selenium nuget packages from 3.141 to 4.13 in a C# Project as I wanted to get rid of referring driver path in my code. I thought to use the enhanced features of Selenium Manager. After upgrade the browser does not launch and the error that I see is :

Unable to obtain chrome using Selenium Manager; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location =-> The type initializer for ‘OpenQA.Selenium.SeleniumManager’ threw an exception. =-> Unable to locate or obtain Selenium Manager binary at C:\Care Director\Automation.…\selenium-manager/windows/selenium-manager.exe

How can we reproduce the issue?

case BrowserType.Chrome:
                    
                        
                       ChromeOptions chromeOptions = new ChromeOptions();
                      
                    chromeOptions.AddArguments(
                                                "--no-sandbox",
                                            "--disable-dev-shm-usage",
                                            //"--disable-gpu",
                                            "--window-size=1920,1080");
                    chromeOptions.AddExcludedArgument("enable-automation");
                    WebDriver = new ChromeDriver(chromeOptions);
                    WebDriver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(60);
                    break;

Relevant log output

Unable to obtain chrome using Selenium Manager; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location =->
 The type initializer for 'OpenQA.Selenium.SeleniumManager' threw an exception. =->
 Unable to locate or obtain Selenium Manager binary at C:\Care Director\Automation\.......\selenium-manager/windows/selenium-manager.exe

Operating System

Windows 10

Selenium version

4.13

What are the browser(s) and version(s) where you see this issue?

Tried with Chrome

What are the browser driver(s) and version(s) where you see this issue?

Chrome - 117

Are you using Selenium Grid?

No

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Comments: 18 (7 by maintainers)

Most upvoted comments

The core point here is that VS executes your tests assembly from .../Out foder rather than bin/Debug folder. If you can share a knowledge how to reproduce this behavior it would be much helpful.

I remember this is something related to DeploymentItem, but I would like to see it in action on my computer.