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()
    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)

  • 1
    Check permissions on folder where chromium is located.
    – Prome
    Nov 4, 2019 at 13:12

3 Answers 3


You should specify the chromedriver.exe executable file path:

driver = webdriver.Chrome(executable_path=r"C:\Chrome\chromedriver.exe")

For Windows, Allow Read & Execute Permissions on chromedriver.exe for Everyone:

  1. Right Click chromedriver.exe > Properties On ChromeDriver
  2. On ChromeDriver Properties Window > Security Tab, click Edit
  3. On Permissions for ChromeDriver Window > Security tab, click Add
  4. On Select Users window, set name to Everyone and click OK button
  5. On Permissions for ChromeDriver Window > Security tab, make sure Read & Execute box is checked & click OK button
  6. On ChromeDriver Properties Window, click OK button

enter image description here

For Linux:

  1. Check you have installed latest version of chrome browser-> "chromium-browser -version"
  2. If not, install latest version of chrome "sudo apt-get install chromium-browser"
  3. Get the appropriate version of chrome driver from http://chromedriver.storage.googleapis.com/index.html
  4. Unzip the chromedriver.zip
  5. Move the file to /usr/bin directory sudo mv chromedriver /usr/bin
  6. Goto /usr/bin directory and you would need to run something like "chmod a+x chromedriver" to mark it executable.
  7. finally you can execute the code.

If using Linux, removing and readding the driver NuGet packages will solve the permissions


Just you can cut chromeDriver.exe from debug folder and paste it to another place, then rebuild the project again

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.