Open SunstriderEx opened 1 year ago
@SunstriderEx I believe this feature works as expected, as the scenario environment variables are only for user scripts. However, the environment variables provided by the command-line are for the k6 process and its execution.
Brief summary
There are Browser Module Options that can be provided as environment variables. When providing this options in command line then it works. But in scenario (section
env
) it don't.xk6-browser version
k6 v0.47.0 (commit/5ceb210056, go1.21.2, windows/amd64)
OS
Windows 10
Chrome version
117.0.5938.152
Docker version and image (if applicable)
No response
Steps to reproduce the problem
Just run following script:
Expected behaviour
Browser Module Options have to work with scenario. In this case browser GUI should be visible and console info message (
console.log()
) should be hidden.Actual behaviour
Browser Module Options provided in scenario has no effect – browser opens in headless mode and
info
messages appear in output. Output messages for the script:As you can see
__ENV.K6_BROWSER_LOG
equalserror
butinfo
message presented anyway.When providing this options in command line then it works as expected: