🗑 Clear cache of a chrome browser in a Selenium flow
const webdriver = ;const driver = await ;const clearCache = ; await driver;await driver;await driver;// Web page redirects usawait driver; await ; await driver;// Gather logged in performance metrics
Uses chrome driver. Get one
Behaviour and Options
The default behaviour clears the cache and history from the last hour. Options can be applied (in form of named arguments) to configure what the browser should clear
name | default |
---|---|
cookies | false |
cache | true |
history | true |
await ; // Also clears the cookies await ; // Do not clear the history