DRFGdh
DRFGdh

Reputation: 33

How can I run test scenario in chrome using browser cache in karate?

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.

Upvotes: 1

Views: 309

Answers (1)

Peter Thomas
Peter Thomas

Reputation: 58058

This is not a normal requirement, but we have an option to set the userDataDir, here below is a screenshot from the documentation:

enter image description here

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.

Upvotes: 1

Related Questions