Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Unable to move the cache" error in selenium webdriver

While running the selenium webdriver script for chrome browser, I am getting the below error:

[2144:7568:0519/130434:ERROR:cache_util_win.cc(20)] Unable to move the cache: 0
[2144:7568:0519/130434:ERROR:cache_util.cc(134)] Unable to move cache folder C:\Users\Prudvi\AppData\Local\Google\Chrome\User Data\ShaderCache\GPUCache to C:\Users\Prudvi\AppData\Local\Google\Chrome\User Data\ShaderCache\old_GPUCache_000
[2144:7568:0519/130434:ERROR:cache_creator.cc(129)] Unable to create cache
[2144:7568:0519/130434:ERROR:shader_disk_cache.cc(589)] Shader Cache Creation failed: -2

Could some one help me out please

like image 451
prudvi Avatar asked May 19 '16 08:05

prudvi


People also ask

Does selenium clear cache?

Selenium does not provide a way to delete cache, here are some workarounds. There are a few ways in which cache can be deleted using Selenium Webdriver for regular Chrome browsers. For instance, here they explain how selenium can be used to clear cache like a real user i.e., by navigating to chrome settings.


1 Answers

I assume you're starting your chrome driver attaching your default profile.

It's not the problem of your chrome driver, It's because you are running another chrome instance while you are starting your selenium webdriver, so some of the files in the profile is locked so that your selenium webdriver can not move it.

I encountered the same problem and shut down all chrome instances before starting my selenium webdriver solved the problem.

like image 116
Wood Avatar answered Oct 17 '22 14:10

Wood