you’re using an outdated forum post as reference which uses a wrong command to install xk6. I’ve updated it now to include the correct command, which is:
xk6 has now produced a new k6 binary which may be different than the command on your system path!
Be sure to run ‘.\k6.exe run <SCRIPT_NAME>’ from the ‘D:\k6\scripts\k6\bdds’ directory.
I then run echo %PATH% and it shows the following path for k6 C:\Program Files\k6\ and the following for Go C:\Program Files\Go\bin;. I replace the k6.exe in this path (C:\Program Files\k6\ ) with the new binary.
Well, you replaced the k6.exe binary, so there’s no xk6-browser.exe anywhere in your %PATH%, AFAICT.
I wouldn’t recommend replacing C:\Program Files\k6\k6.exe since that’s the binary of the k6 MSI package you installed. Instead, you could place xk6-browser.exe in the same directory, and that should make xk6-browser available system-wide, since C:\Program Files\k6\ is already in your %PATH%.
Im not sure where i get the xk6-browser.exe from.
After running http://go.k6.io/xk6/cmd/xk6@latest then xk6 build, a new file called k6.exe i created. Where do i get the xk6-browser.exe file from?
In that case, if you replaced C:\Program Files\k6\k6.exe with the new binary, you should run the command k6 run browser_test.js instead.
The xk6-browser.exe binary can be created by changing the --output option passed to xk6 build. E.g. xk6 build --output xk6-browser --with github.com/grafana/xk6-browser, or by downloading it from our pre-built packages in the GitHub release. Or you could just rename it manually.
I now see that our documentation is a bit confusing about this, and we’ll fix it shortly. Sorry for the confusion.