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.
First end the process of chromedriver.exe from Task Manger, then Delete the chromedriver.exe from your project bin file and check whether Selenium. WebDriver. ChromeDriver package installed or not, If it's not installed you should installSelenium.
To do that, you need to click on Task Manager (Cntrl+Alt+Del) -> Select Task Manager and search for all Chorme Driver(s) and delete these tasks from process on Task Manager.
Below are the steps to follow while configuring the chrome setup for Selenium. #1) Check the version of the chrome. #3) Download the chromedriver.exe file for the respective OS and copy that .exe file into your local. #4) The path of the chromedriver (C:\webdriver\chromedriver.exe) will be used in our program.
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
I solved it by shutting down the ChromeDriver correctly. I used: IWebDriver.Dispose() for quitting the ChromeDriver process
In your case, after your test completes, there should be a chromedriver.exe in your Task Manager which does not quit until you manually "End Process" it. However, if you use IWebDriver.Dispose(), it kills the process. And now, since the chromedriver.exe is no longer in use, the "Access denied" problem also goes away.
Hope this solves your problem. Reference: https://stackoverflow.com/a/44126143/1785144
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With