Query on xk6-browser APIs


When I hit a webpage(running the script using xk6 browser extension) there are two backend calls made. I can see these calls when I open Network–>Fetch/XHR section of DevTools. Now I would like to capture headers of those two requests.

I was trying to use page.waitForRequest(‘’) and page.on(‘’) methods from xk6-browser extension but getting error like “page.waitForRequest(urlOrPredicate, Opts) has not been implemented yet”

Can you please tell how do I resolve this error and fetch headers for my backend requests.


** small update
I was also trying to use request.allHeaders() inside page.on() but then getting error like “Object has no member ‘on’”

Hi there,

unfortunately, as the error message says, this isn’t implemented yet. It’s on our roadmap, and you can follow the progress in this issue.

Sorry for the inconvenience.