xk6-browser
xk6-browser copied to clipboard
Browser cannot find the executable path if the executablePath option is null
If the executablePath is set to null, then chromium will not be found. My expectation would be that null should imply default behavior.
export default function() {
const browser = launcher.launch('chromium', {
executablePath: null, // Override search for browser executable in favor of specified absolute path
});
Hi @GavinB-hpe,
If you want xk6-browser to find the executable path, you should not include executablePath
option. Then again, I agree with you that, providing a null
value should imply the default behavior, or better yet, raise a better error.
Is there a reason for providing a null
value for the option instead of omitting it?
Thanks.
I just did a copy-paste of all the options from the documentation, and was going to experiment with a few of them. I suspect a number of k6 beginner folks may get caught out by this.
Especially as the error message is wrong - it says browser executable not in $PATH or something similar. And of course it is!
Thanks for raising this @GavinB-hpe. I think we're going to go down the route of making the error message clearer (as well as the documentation) to ensure that the null
for executablePath
is a bad input value.