I am getting below error while running the code. I am using cucumber ruby capybara framework.If there is any solutions please do answer. Thanks a lot.
Error is as below:
Unknown error: cannot create temp dir for user data dir (Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 10.0.14393 x86_64) (Selenium::WebDriver::Error::UnknownError)
I was facing the same issue with chrome drivers. Following are the cases that I found could lead to this issue:
In my case TEMP was mapped to C:\Users\MyUser\AppData\Local\Temp\MyFolder. So when the Temp folder got cleared, MyFolder folder also got deleted and chromedriver threw "Unknown error: cannot create temp dir for user data dir" . By creating a new folder with name "MyFolder" in Temp folder fixed my issue.
TEMP and TMP path can be verified at
My Computer -> Properties -> Advanced System settings -> Environment Variables -> Variables used for < your user >
Or else you can check it by entering "%temp%" in "Run" window.
Its better to check path using both ways because I have seen some cases where temp path set in environment variable and path of folder that opens on executing %temp% command via Run were different.
Hope it helps.
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