question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Browser in configuration file are parsed even if browsers are given on the command line

See original GitHub issue

Applies to TestCafé 1.16.1

What is your Test Scenario?

I have a .testcaferc.json file such as:

{
    "browsers": ["ie", "firefox"]
}

Also, I do have Firefox installed but not Internet Explorer.

What is the Current behaviour?

I call npx testcafe edge tests/ --skip-js-errors

Now I get: ERROR Cannot find the browser. "ie" is neither a known browser alias, nor a path to an executable file.

What is the Expected behaviour?

Since the browser edge is given on the command line, the browsers from the config file should be ignored.

This is a change from previous behaviour. At least for 1.10.1, the config file browsers list was ignored. It took me ages to pinpoint the problem when our CI broke: We had a .testcaferc.json checked in for local development, but CI tried to use Browserstack instead; now the build broken just saying that chrome was not available.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dboujotcommented, Jan 3, 2022

Hello @miherlosev, I have the same problem than @piefel. I have a .testcaferc.json such as : { "browsers": [ "chrome", "firefox", "edge" ], "src": "tests/e2e/**/*.ts" }

When I launch my tests with testcafe v 1.18.1 from my gitlab pipeline I have the following error “ERROR Cannot find the browser. “edge” is neither a known browser alias, nor a path to an executable file.” The browser name provided by the command is ignored. image

When I launch the same tests with an older version of testcafe, v 1.14.2, everything works fine image

@miherlosev, cloud you do the test with an other OS than Windows, please?

0reactions
github-actions[bot]commented, May 6, 2022

Release v1.19.0-alpha.1 addresses this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Command Line Interface | API | Docs - TestCafe
The browser-list-comma-separated argument specifies the comma-separated list of browsers where to run tests. Related configuration file property: browsers.
Read more >
Configuration - Cypress Documentation
This guide is for Cypress 10 and the new JavaScript configuration file format. If you are on an older version of Cypress that...
Read more >
Handling common JavaScript problems - MDN Web Docs
Now we'll look at common cross-browser JavaScript problems and how to fix them. ... jshint filename.js was entered at the command line.
Read more >
2. Set policies - Chrome Enterprise and Education Help
Turn on Command-line parameters for the alternative browser. Under Options, specify the arguments to pass on to the alternative browser's executable file. ( ......
Read more >
Configuration File - WebdriverIO
The configuration file contains all necessary information to run your test suite. It's a NodeJS module that exports a JSON.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found