Find a way to run TestCafe on macOS without requiring Screen Capture and Automation permissions
See original GitHub issueWhat is your Scenario?
I want to run testcafe on a Github Actions macOS 10.15 instance
What is the Current behavior?
Regardless of passing --disable-screenshots and using headless browsers, and not enabling video, testcafe requires the screen recording permission, which there’s no clear way to grant from the command line, only the UI
ERROR UnableToAccessScreenRecordingAPIError: The find-window process cannot access the Screen Recording API.
at runFindWindowBinary (/Users/runner/work/learn-something/learn-something/node_modules/testcafe-browser-tools/src/api/find-window.js:36:19)
at Object.default_1 (/Users/runner/work/learn-something/learn-something/node_modules/testcafe-browser-tools/src/api/find-window.js:43:15)
at checkAuthentication (/Users/runner/work/learn-something/learn-something/node_modules/testcafe/src/cli/authentication-helper.ts:28:26)
at Object.authenticationHelper [as default] (/Users/runner/work/learn-something/learn-something/node_modules/testcafe/src/cli/authentication-helper.ts:43:29)
at Runner._checkRequiredPermissions (/Users/runner/work/learn-something/learn-something/node_modules/testcafe/src/runner/index.js:530:27)
at Runner._validateBrowsers (/Users/runner/work/learn-something/learn-something/node_modules/testcafe/src/runner/index.js:304:13)
at Runner._validateRunOptions (/Users/runner/work/learn-something/learn-something/node_modules/testcafe/src/runner/index.js:461:9)
Type "testcafe -h" for help.
What is the Expected behavior?
When screenshots are disabled and video is not enabled, the screen recording permission should not be required
What is your public website URL? (or attach your complete example)
What is your TestCafe test code?
n/a, happens with any tests
Your complete configuration file
testcafe --config-file ./testcafe.ci.json safari:headless ./e2e/*.test.ts
testcafe.ci.json:
{
"disableScreenshots": true
}
Your complete test report
ERROR UnableToAccessScreenRecordingAPIError: The find-window process cannot access the Screen Recording API.
at runFindWindowBinary (/Users/runner/work/learn-something/learn-something/node_modules/testcafe-browser-tools/src/api/find-window.js:36:19)
at Object.default_1 (/Users/runner/work/learn-something/learn-something/node_modules/testcafe-browser-tools/src/api/find-window.js:43:15)
at checkAuthentication (/Users/runner/work/learn-something/learn-something/node_modules/testcafe/src/cli/authentication-helper.ts:28:26)
at Object.authenticationHelper [as default] (/Users/runner/work/learn-something/learn-something/node_modules/testcafe/src/cli/authentication-helper.ts:43:29)
at Runner._checkRequiredPermissions (/Users/runner/work/learn-something/learn-something/node_modules/testcafe/src/runner/index.js:530:27)
at Runner._validateBrowsers (/Users/runner/work/learn-something/learn-something/node_modules/testcafe/src/runner/index.js:304:13)
at Runner._validateRunOptions (/Users/runner/work/learn-something/learn-something/node_modules/testcafe/src/runner/index.js:461:9)
Type "testcafe -h" for help.
ERROR: "test:e2e:safari:headless" exited with 1.
ERROR: "test:e2e:ci:mac" exited with 1.
Error: Process completed with exit code 1.
Screenshots
No response
Steps to Reproduce
- Run testcafe on a macOS 10.15 instance in Github Actions
TestCafe version
1.17.1
Node.js version
v15.3.0
Command-line arguments
–config-file ./testcafe.ci.json safari:headless ./e2e/*.test.ts
Browser name(s) and version(s)
Safari, not sure of the version
Platform(s) and version(s)
macOS 10.15 in Github Actions
Other
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:18 (4 by maintainers)
Top Results From Across the Web
Grant or Fix TestCafe Permissions on macOS | Recipes | Docs
Follow these instructions if you have a new installation of TestCafe. Step 1. Run TestCafe. Launch TestCafe. If you don't have a TestCafe...
Read more >Testcafe tests are not executed on MacBook Big Sur with ...
TestCafe requires permission to record the screen. Open 'System Preferences > Security & Privacy > Privacy > Screen Recording' and check ' ...
Read more >Test Configuration Options - Sauce Labs Documentation
An index of automation test configuration settings compatible with Sauce Labs test protocols.
Read more >TestCafe Webinar - Your Questions Answered
TestCafe does not require browser plugins, SDKs or other tools and ... You can find information how to run tests in parallel in...
Read more >Run TestCafe tests on internal networks | BrowserStack Docs
You do not need to make any separate arrangements to run any locally hosted website. You can simply specify the localhost URL and...
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

It’s working again with the v1.18.0 upgrade instructions. My studio isn’t working but that should be fixed with the release of 1.7.0. Thanks for the help 😃
Hi,
Thank you for your input. We have reproduced the problem. Please stay tuned.
Note for team - reproducible on Intel machine.