WebPagetest Forums
Is there a way to not clear browser cache between tests? - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Private Instances (/forumdisplay.php?fid=12)
+--- Thread: Is there a way to not clear browser cache between tests? (/showthread.php?tid=13179)



Is there a way to not clear browser cache between tests? - pganti - 08-20-2014 09:45 AM

I am thinking of running a few private instances where the browser cache is not deleted from run to run. Just keep it running normally and things get evicted when they get evicted thus being more realistic.

How do I go about disabling the new window every single time?


RE: Is there a way to not clear browser cache between tests? - pmeenan - 08-26-2014 05:53 AM

If you modify the wptdriver.ini file command-line for Chrome and Firefox and remove the bit that points to a custom profile directory it should do what you want (sorry, no way to do it for IE). WPT will still create a clean profile for every test but it won't point the browser to it so it won't get used.

The other option if you want to use a cache with a specific snapshot would be to create a template profile under templates/ that is configured the way you want and add that to wptdriver.ini (Firefox already has one). In that case WPT will copy your template profile before every test.


RE: Is there a way to not clear browser cache between tests? - pganti - 08-27-2014 07:10 AM

As always @pmeenan, much indebted, It worked like a charm


RE: Is there a way to not clear browser cache between tests? - kzarifis - 04-04-2017 02:56 PM

(08-26-2014 05:53 AM)pmeenan Wrote:  If you modify the wptdriver.ini file command-line for Chrome and Firefox and remove the bit that points to a custom profile directory it should do what you want (sorry, no way to do it for IE). WPT will still create a clean profile for every test but it won't point the browser to it so it won't get used.

Looks like as of commit 8866dcdbb6bcadfbf0d13d48a3052bd27985ddb7 --user-data-dir always gets set to the default WPT profile, so the above method cannot be used, right? (I've worked around this, but it might be useful to have a way to tell WPT not to ClearUserData() at the end of a test)