selenium webdriver中的"无法移动缓存"错误

pru*_*dvi 13 google-chrome selenium-webdriver

在为chrome浏览器运行selenium webdriver脚本时,我收到以下错误:

[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
Run Code Online (Sandbox Code Playgroud)

有人可以帮帮我吗

Woo*_*ood 16

我假设您正在启动附加默认配置文件的Chrome驱动程序.

这不是你的chrome驱动程序的问题,这是因为你在启动你的selenium webdriver时正在运行另一个chrome实例,因此配置文件中的一些文件被锁定,因此你的selenium webdriver无法移动它.

我遇到了同样的问题并在启动我的selenium webdriver之前关闭了所有chrome实例解决了问题.

  • 这是正确的答案。确保您已关闭所有 chrome 背景实例。 (2认同)

pru*_*dvi 0

这是chrome驱动安装的问题。我安装了 chrome 驱动程序后,它对我有用。谢谢