I am testing a scenario in which I have to run chrome with cache so how can I do that as by default it launches browser without any cache.
This is not a normal requirement, but we have an option to set the userDataDir
, here below is a screenshot from the documentation :
So if you know the path of a directory that exists, you can pass that. That said, maybe the correct testing strategy is to make a call 2 times and ensure that the second call is being cached. But some investigation may be required.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.