Generate .har file support?

Hi, I see lots of documentation & examples of using a har file for generating scripts, so it’s hard to find if the opposite is true. Can k6 browser generate a .har file? I see Playwright does it. Thanks!

Hey @kenp1,
welcome to the community forum :tada:

It sounds you’re looking for k6 Studio | Grafana k6 documentation. Did you already try it?

Let me know if it helps.

Hi - thanks for your reply, but I don’t think that’s it. Picture executing a k6 browser script, and at the end a .har file is generated. Playwright does this along the lines of:

 const context = await browser.newContext({    recordHar: { path: 'app.har' }  });

I’m sorry, I did miss the k6-browser category. If that the case, then the unique workaround we can offer is the one commented here: get the request information in browser mode · Issue #4352 · grafana/k6 · GitHub

thanks - I will take a look and if needed, follow up there.