Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to clear chrome cache before start of each test run ? #514

Open
manishdube opened this issue Feb 22, 2021 · 2 comments
Open

Comments

@manishdube
Copy link

Is your feature request related to a problem? Please describe.
Yes. Its really how we have implemented our framework where the chrome browsers loops through 300 similar tests, consequently causing caching issues with the chrome browser.

Describe the solution you'd like
Be able to clear browser cache via a function call at the start of each test run

Describe alternatives you've considered
Alternatives we considered was to shorten the test iterations but this causes issues of collation of reports and identifying failures across the various reports.

Additional context
a clear cache function call would be super.

@olivercoad
Copy link
Contributor

olivercoad commented Feb 22, 2021

https://github.com/omrilotan/selenium-chrome-clear-cache/blob/482f06b24c661edcbdf7534c7aeabcef935b973d/index.js looks promising. It loads chrome://settings/clearBrowserData, checks the checkboxes and clicks the button. It would probably be pretty easy to implement that using canopy.

@lefthandedgoat
Copy link
Owner

There is not a built in way to do this. You can try the suggestiosn that Olivercoad said or you can try these via Js https://medium.com/tenets/cookies-n-cache-in-selenium-3de5b7dc0407

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants