A file ‘xk6-browser’ exists at my working directory, it is approximately 30KB in size.
I’ve created a simple test in a file called browser-test.js
The test attempts to launch a ‘chromium’ browser
When I type ‘./xk6-browser run Browser/browser-test.js’ in PowerShell from my working directory a Windows dialog appears “How do you want to open this file?”, with options such as Adobe, Visual Studio, Notepad, etc.
A file ‘xk6-browser’ exists at my working directory, it is approximately 30KB in size.
Where did you get this file? The xk6-browser binary should be around 30MB in size, not 30KB. Was this a typo?
My hunch is that this was an HTML or text file that you mistakenly downloaded as xk6-browser, which is why Windows was prompting you to open it in a specific program. And it worked fine when you compiled your own binary with xk6.
If you don’t want to compile your own, make sure to download an official Windows binary from our GitHub releases page.
There’s a xk6-browser-<version>-checksums.txt file there you can use to confirm whether you have the correct archive. You can compare that SHA256 checksum with the output of the Get-FileHash cmdlet in PowerShell. You should see something like this:
Then your file is being corrupted while downloading or something is corrupting it locally. There could be many reasons for this. Try using a different network connection. Do you have an antivirus running that could be falsely detecting and corrupting it?
FWIW I tested with the release binary and it works fine for me in PowerShell on Windows 10.
For xk6-browser-v0.2.0-windows-amd64.msi the Get-FileHash is returning 92DACCCF03886F5F1B01CFCD496B96C8844917BED42CC3F7A6DF3B9D95D41D9E
on two separate computers
I’m still new to this feature but as far as I can tell the xk6 browser is starting correctly on my machine.