Current time: 12-14-2017, 08:36 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there a way to not clear browser cache between tests?
08-20-2014, 09:45 AM
Post: #1
Is there a way to not clear browser cache between tests?
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?
Find all posts by this user
Quote this message in a reply
08-26-2014, 05:53 AM
Post: #2
RE: Is there a way to not clear browser cache between tests?
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
08-27-2014, 07:10 AM
Post: #3
RE: Is there a way to not clear browser cache between tests?
As always @pmeenan, much indebted, It worked like a charm
Find all posts by this user
Quote this message in a reply
04-04-2017, 02:56 PM (This post was last modified: 04-22-2017 12:30 AM by kzarifis.)
Post: #4
RE: Is there a way to not clear browser cache between tests?
(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)
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)