I am using the testcaferc.js file for congfiguration.
And I see the following error when I run the test:
An error has occurred while reading the ".....testcaferc.js" configuration file. ERROR Cannot find the browser. "./test1.js" is neither a known browser alias, nor a path to an executable file.
My project has the following folders/files:
1. The contents of .testcaferc.js
Note: I have tried all sorts of quotes to specify the browser, but none of the combination worked. some examples below:
module.exports = {
skipJsErrors: true,
"browsers": "chrome"
// other settings
}
or
module.exports = {
skipJsErrors: true,
browsers: "chrome"
}
or
module.exports = {
skipJsErrors: true,
browsers: 'chrome'
}
2. The contents of test1.js file
So, finally, after a lot of confusions and revision of my code, I could get my test running with .testcaferc.js
I got to know that the type:"module" should not be there in the package.json to work with my test.js file
Also noticed that if we write any incorrect code in the .testcaferc.js file, it will keep showing the error similar to the following in the terminal:
An error has occurred while reading the "....testcaferc.js" configuration file. ERROR Cannot find the browser. "./test1.js" is neither a known browser alias, nor a path to an executable file.
Hope it would help someone, who stumbles across this issue. thnx.