【发布时间】:2021-07-01 12:39:55
【问题描述】:
我需要使用 selenium python 禁用网络选项卡上的缓存。尝试了以下方法,但没有任何效果
options = webdriver.ChromeOptions()
options.add_argument("--incognito")
options.add_argument('--disable-application-cache')
options.add_argument("--disk-cache-size=0")
options.add_argument("--disk-cache-dir=/dev/null")
options.add_argument("--disable-gpu")
d = DesiredCapabilities.CHROME
d['goog:loggingPrefs'] = {'browser': 'ALL'}
- 尝试打开 URL 隐身模式,但我仍然必须打开 devtools 并手动禁用缓存
【问题讨论】:
标签: python selenium google-chrome-devtools