Reputation: 2268
I need to code a test, which check if browser cached correctly some piece of data (just check if cache created for some files or not). Is there a way to do this in WebDriver or JavaScript?
Upvotes: 0
Views: 310
Reputation: 25076
The cache directory for Firefox lives under the Cache
folder in the user's firefox profile folder. This can be queried using the normal IO
classes in your language (i.e System.IO
in C#)
However, the files here have no extensions or naming conventions, but I believe they are direct copies of the files. (They are complete copies of Javascript files, for instance)
You would probably have to compare all the files and use a hash comparison to check if something exists or not.
Upvotes: 1