Tests are run only after manually entering the command into the console: C:\Windows\System32\taskkill.exe /im chromedriver.exe /f
When restarting tests, an error occurs:
Severity Code Description Project File Line Suppression State
Error MSB3061 Unable to delete file "C:\Users\User\SolutionName\ProjectName\bin\Debug.net6.0\chromedriver.exe".
Access to the path 'C:\Users\User\SolutionName\ProjectName\bin\Debug.net6.0\chromedriver.exe' is denied.
Project: ProjectName
File: C:\Users\User\SolutionName\ProjectName\bin\Debug.net6.0\chromedriver.exe\107.0.5304.6200\build\Selenium.WebDriver.ChromeDriver.targets 94
Has anyone come across? Tell me what to do.
I removed NuGet Selenium.chromedriver from the tests that had this error and the tests started to run, but there are many processes in the task manager named Chromedriver.exe
At the end of each your Selenium test you have to close the session by driver.quit()
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.