Browser in configuration file are parsed even if browsers are given on the command line
See original GitHub issueApplies 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:
- Created 2 years ago
- Reactions:2
- Comments:8 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

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.
When I launch the same tests with an older version of testcafe, v 1.14.2, everything works fine
@miherlosev, cloud you do the test with an other OS than Windows, please?
Release v1.19.0-alpha.1 addresses this.