相关疑难解决方法(0)

python selenium清除缓存和cookie

我正在尝试清除我的Firefox浏览器中的缓存和cookie,但我无法让它工作.我已经搜索过了,我只获得了java和C#的解决方案.如何清除Python中的缓存和cookie?

硒版本:3.6.0

平台:python

python版本:2.7.8

webdriver:geckodriver

浏览器平台:Firefox

python cookies selenium caching

7
推荐指数
1
解决办法
2万
查看次数

Selenium:清除铬缓存

在我的应用程序中,我需要一种方法在注销之前仅清除chrome浏览器的缓存(除了cookie - 我不想删除cookie).

任何人都可以建议我点击chrome中的CLEAR DATA按钮.我写了下面的代码,但代码不起作用.

配置:

Chrome版本:65.0.3325.181版(官方版)(64位)

Selenium版本:3.11.0

//Clear the cache for the ChromeDriver instance.
driver.get("chrome://settings/clearBrowserData");
Thread.sleep(10000);
driver.findElement(By.xpath("//*[@id='clearBrowsingDataConfirm']")).click();
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

selenium google-chrome

7
推荐指数
3
解决办法
1万
查看次数

标签 统计

selenium ×2

caching ×1

cookies ×1

google-chrome ×1

python ×1