简体   繁体   中英

Unable to run sequential Selenium tests in Visual Studio 2013due to VS holding a lock on ChromeDriver

I've been fighting with intermittent bouts of the following error when trying to run a small suite of selenium tests in Visual Studio 2013 Ultimate (on a windows 10 machine authored in C#.)

Warning 1 Could not copy "C:\\Users\\t3sk0\\Documents\\Visual Studio 2013\\Projects\\UnitTestProject1\\UnitTestProject1\\Dependencies\\chromedriver.exe" to "bin\\Release\\Dependencies\\chromedriver.exe". Beginning retry 1 in 1000ms. The process cannot access the file 'bin\\Release\\Dependencies\\chromedriver.exe' because it is being used by another process. UnitTestProject1

Doing a quick google and StackOverflow search brought me to a known issue that's seemed to have been in existence since 2010-ish with no tangible resolution. Just a handful of odd workarounds from the community. The issue happens more than it doesn't.

Does anyone know of an actual solution to this? It's really slowing me down and it's driving me crazy! Thanks!

Error says:

The process cannot access the file 'bin\\Release\\Dependencies\\chromedriver.exe' because it is being used by another process

Go to task manager kill all the chromedriver process left hanging, or just restart the machine and run the test again.

To avoid this error, use driver.quit() at the end of the test.

Example: http://www.mkyong.com/selenium/many-chromedriver-exe-are-left-hanging-on-windows-selenium/

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM