Error display unable to delete the file chromedriver.exe while running a Selenium project in Visual studio

Viewed 37677

I am running a Selenium C# project through Visual studio and suddenly encountered an error

Access to the path 'c:\users\documents\visual studio 2017\Project\SeleniumTestProject\SeleniumTestProject\bin\Debug\chromedriver.exe' is denied.

I removed the readonly attribute for the folder but still get this error. Can anyone please suggest me what could be wrong and solution for the same.

9 Answers

Just worked when I killed the chrome driver exe from command prompt

  • Launch command prompt and enter "taskkill /f /im chromedriver.exe"

  • Clean your solution

End the chrome driver process from task manager.

My solution was to remove the Selenium.Chrome.WebDriver fixed version that I installed as part of my Nuget package and then cleaned my solution.

enter image description here

Deleted the chrome driver exe from command prompt

Launch command prompt and enter "taskkill /f /im chromedriver.exe" command. Then rebuild the code again.

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

Related