My automated tests use a proxy to ensure that the browser is not ip-authenticated. I need to do the same for the xk6-browser tests.
i used an example i found using playwright that supposedly launches it with proxy, but it does not work
here is the example of the code i used(scrubbed proprietary urls)
Unfortunately the proxy option is currently unimplemented, in the sense that it’s not being set when launching the browser. We have an issue open that relates to that and that you can use to track the availability of the feature.
Could you try to launch the script with the K6_BROWSER_ARGS=“proxy-server=<proxy_host>:<proxy_port>” environment variable?
For me on linux it is working like this if I start a squid proxy on port 3128:
K6_BROWSER_HEADLESS=false K6_BROWSER_ARGS="proxy-server=127.0.0.1:3128" k6 run script.js