Home > Mobile >  “ERROR Unable to find the browser. “saucelabs:[email protected]:Windows10” is not a browser alias or path
“ERROR Unable to find the browser. “saucelabs:[email protected]:Windows10” is not a browser alias or path

Time:12-07

I am trying to run my UI test using testcafe and saucelabs. I am facing this above error. Currently I am using testcafe v1.8.3 and testcafe-browser-provider-saucelabs v1.7.0

I have tried changing versions of browser provider also but still facing the above error. Pls help out with a solution for this as i am stuck with it for more than a week

CodePudding user response:

It looks like your provider is installed locally, while you are using the global TestCafe installation. You also need to install TestCafe locally or both packages globally. After this, check your browser provider: testcafe -b saucelabs.

I am using testcafe v1.8.3 and testcafe-browser-provider-saucelabs v1.7.0

Please update your testcafe and testcafe-browser-provider-saucelabs versions to the latest ones.

CodePudding user response:

So, it looks like the runner you are using (testcafe-browser-provider) is a very old one, there is a new runner you can use for testcafe tests called saucectl.

TLDR:

  1. Install saucectl globally npm install -g saucectl
  2. Set up saucectl within your project folder with saucectl init This will create a .sauce/config.yml file
  3. Tweak the settings to run the spec files and OS/ browser of your choice
  4. Use saucectl run

You can see an example proj here: https://github.com/saucelabs/saucectl-testcafe-example

  • Related