0
votes

I am trying to run a perl script using selenium webdriver. After successful execution of script, I am getting following error: *

cannot unlink file for C:\Users\\AppData\Local\Temp\89qNk6oDJh\cert8.db: Permission denied at C:/Strawberry/perl/lib/File/Temp.pm line 1616.

*

And the line 1616 in Temp.pm looks like this:

eval { rmtree($self->{REALNAME}, $File::Temp::DEBUG, 0); };

What can be the cause?

My script is simple perl program, it creates a webdriver object and open a URL and gets the title.

1
So what are those permissions on that file you are trying to unlink?zdim
Sounds like the browser is still running, and keeping this file locked somehow.tripleee
@zdim Actually, this error comes for all the files which are created in the Temp folder(in this case "89qNk6oDJh"). And in windows checklist I am seeing that all users have full control on the files. @tripleee I use $webDriver->close(); to close the browser. It should close browser.prateek goyal
OK, that matters a lot for the question. I'd suggest an edit, add this information.zdim

1 Answers

1
votes

In Windows a file cannot be deleted while it is open.