testcafe: Unable to run chrome at /Applications/Google_Chrome.app
Are you requesting a feature or reporting a bug?
Reporting a bug
What is the current behavior?
When executing testcafe chrome test.js, I get:
ERROR Was unable to open the browser "locally-installed:chrome" due to error.
Unable to run the browser. The file at /Applications/Google_Chrome.app does not exist or is not executable.
testcafe -b gives me firefox, chrome and safari. Running the test with Firefox or Safari works fine.
What is the expected behavior?
A Chrome window should open.
How would you reproduce the current behavior (if this is a bug)?
npm install testcafe -g and executing a test file with testcafe chrome test.js.
Provide the test code and the tested page URL (if applicable):
Tested page URL: https://devexpress.github.io/testcafe/example
Test code:
fixture `Example page`
.page `https://devexpress.github.io/testcafe/example`;
test('Emulate user actions and perform a verification', async t => {
await t
.setNativeDialogHandler(() => true)
.click('#populate')
.click('#submit-button');
const location = await t.eval(() => window.location);
await t.expect(location.pathname).eql('/testcafe/example/thank-you.html');
});
Specify your
- operating system: macOS Sierra 10.12.4
- testcafe version: 0.14.0
- node.js version: 7.8.0
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 24 (10 by maintainers)
@valstu Thank you for sharing your experience. TestCafe scans the
/Applicationsfolder and treats any app from this directory as a browser if its name containsChrome. I suggested a more robust modification of the browsers detection algorithm: https://github.com/DevExpress/testcafe-browser-tools/pull/144, but it was slower and we decided that we should combine it with the current implementation to reduce the browser detection time.Also, we can improve the error message to include the path to the browser: #3589.
@AndreyBelym - Update on my above comment. I was able to make it work by changing the ownership of
Jenkinsuser todevuser. The steps provided in this link didn’t work for me. I have to do a bit more modification. I did 2 more steps and not performed the last step mentioned in this comment.Firstly, I stopped the Jenkins as mentioned in this link. Secondly, I updated the JENKINS_HOME and USER_NAME as mentioned here. Thirdly, I changed the ownership of
/var/log/jenkinsto the user I wanted to run Jenkins Lastly, started Jenkins as mentioned.