I am using k6 experimental module browser, and experiencing this Go error: BrowserContext.storageState(opts) has not been implemented yet
This is probably because k6 browser doesn’t support .storageState yet. Do you know any workarounds?
My goal is to automate logging process so that the tests don’t need to sing in every time, but instead have logged in state: inspired by Playwright’s auth process
When I follow the script from PW’s docs, I’m getting Go error (the above error). Probably, k6 not supporting this feature yet? Looking for any workarounds. Thanks!
storageState is an unimplemented method. addCookies on the other hand should work. Which version of k6 are you running? v0.44.1 is the latest version of k6.
Hey @ankur
Thanks for the quick feedback. I was running 0.43.0, now with 0.44.1 I don’t see the issue anymore!
Yes, with addCookies it is working. What I did is manually logged in, extracted name and value from the logged in user cookie… and pasted in the code like:
At the moment there is no way to write and read cookies from disk that can be accessed by different vus and iterations with the browser module. You could try writing to a distributed storage system, and read from it – the details of which can be found in this thread.