I have a .Net framework method that try to use selenium to connect to a site for retrieve data.
I have installed Selenium.WebDriver and Selenium.Support from NuGet.
When the method is called by a Test project it work
When the method is called by a Windows Service it work
When the method is called by a debug WebApi in VS2019 it try to locate "selenium-manager.exe" in the wrong folder
E:\Lavoro\tecnositalia.visualstudio.com\tools.scooter.it\tools.scooter.it\selenium-manager\windows\selenium-manager.exe
instead
E:\Lavoro\tecnositalia.visualstudio.com\tools.scooter.it\tools.scooter.it\bin\selenium-manager\windows\selenium-manager.exe
throwing "The type initializer for 'OpenQA.Selenium.SeleniumManager' threw an exception."
Publish project on a IIS, and calling the webservice locate the "selenium-manager.exe" correctly, but I get this error:
throwing "Error starting process: C:\inetpub\wwwroot\tools.scooter.it\selenium-manager\windows\selenium-manager.exe --browser "chrome" --language-binding csharp --output json"
C# code:
ChromeOptions oChromeOptions = new ChromeOptions() { AcceptInsecureCertificates = true };
oChromeOptions.AddArgument("--headless");
IWebDriver oIWebDriver = new ChromeDriver(oChromeOptions); //Throw the error