Azure DevOps is triggering and running tests on a VM.
All my tests are working fine on local machine.
On VM, While trying to launch Chrome browser using ChromeDriver
and WebDriverManager
, tests are failing at LaunchChromeDriver
method with failure as 'Access is Denied' at step new ChromeDriver
(options);
This is how the method looks like:
public static IWebDriver LaunchChromeDriver()
{
try
{
new WebDriverManager.DriverManager().SetUpDriver(new ChromeConfig());
ChromeOptions options = new ChromeOptions();
driver = new ChromeDriver(options);
return driver;
}
catch(Exception e)
{
log.info("Exception is "+e);
return null;
}
}
Am I missing something or do I need to modify the code?
Did anyone experience the same?
Getting an exception as below:
System.ComponentModel.Win32Exception (0x80004005): Access is denied at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at OpenQA.Selenium.DriverService.Start() at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute) 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)