-
Notifications
You must be signed in to change notification settings - Fork 675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find a way to run TestCafe on macOS without requiring Screen Capture and Automation permissions #6789
Comments
Hello, Please update to testcafe v.1.17.2-rc.3 and let us know if the problem has been resolved. |
I just tried it with 1.17.2-rc.3 and got the same error as before |
Same on 1.18 as well, in case that matters |
Hi, Thank you for your input. We have reproduced the problem. Please stay tuned. Note for team - reproducible on Intel machine. |
I'm still having the same issues on 1.18, already made a ticket a month ago and it's not fixed or answered. |
Hi, @roelvandijk88, the problem you mentioned was fixed for local test running in testcafe v1.18.0. Please follow v1.18.0 upgrade instructions. If the issue persists on your local machine after that, please open a new issue with an example project and a video to show how to reproduce the issue. Make sure that the call stack of the problem is also visible. |
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 :) |
@AlexanderMoiseev Thanks, I understand that SIP is the immediate origin of the error. My point in filing this bug was that, with TestCafe set to neither take screenshots nor record video, screen recording should not be required at all, and SIP should not be triggered to begin with. Since self-hosted runners are costly and the SIP trigger seems needless, it feels like an easy win to get testcafe to provoke the screen record permission only when screen recording is actually needed. |
Solved it. |
I am seeing exactly the same problem in CircleCI with TestCafe 1.18.3... please advise how we can workaround this |
For information on how to grant permissions in macOS CircleCI images, please refer to the Setting up a macOS UI Test Project topic. This document contains information about the macOS permission orb that can record Safari automation permissions to the macOS database. |
Hi, To workaround this issue on Azure DevOps I'm using this workaround found at Stackoverflow: https://stackoverflow.com/questions/63341991/are-there-any-solutions-to-the-fact-that-testcafe-doesnt-work-on-macos-images-w/63355065#63355065
However when a test fails, it seems that this approach isn't picking up the failure and the job keeps running untill it finally times out after 60 minutes. Is there a configuration setting or option to disconnect the remote session right away if the test fails? |
Hello @thomasvdb |
I work in a closed secure environment and am not able to grant macOS permission to run screen capture. Any suggestions how to disable screen recording and the os check. My tests used to work on old Mac. I got a new Mac and now I can’t run tests. The Mac is locked and admins are not allowed to modify settings to customize for user. The feature that prevents test cafe from working when screen recording is not allowed feels wrong. I would benefit from running my tests without screen capture than not being able to run any tests at all. |
Hi @javadoug, Another way exists but it has all limitations of remote tests. Create a remote connection and just run your browser, for example, Safari in this way: exec(`open -a /Applications/Safari.app ${url}`); where |
Going to drop this here, would be great if testcafe was able to figure out it's running in github actions and execute this on its own, but hey, there seems to be a way now. |
Hi @panva, There are still problems with running tests on the
|
Hi @Aleksey28, I didn't realize you're behind DevExpress, thank you for sorting this out with the github runners team <3 |
@Aleksey28 do you have a working TCC.db adjustment for the apple silicon based |
@Bayheck yeah, here you go https://github.com/panva/oauth4webapi/actions/runs/7840958151/job/21396423974#step:6:6 You may test this on your own CI integration by updating
testcafe/.github/workflows/test-functional.yml Lines 137 to 141 in 876db34
|
So for macos-14 it's
|
This issue has been automatically marked as stale because it has not had any activity for a long period. It will be closed and archived if no further activity occurs. However, we may return to this issue in the future. If it still affects you or you have any additional information regarding it, please leave a comment and we will keep it open. |
We're closing this issue after a prolonged period of inactivity. If it still affects you, please add a comment to this issue with up-to-date information. Thank you. |
What 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
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)
https://learnsomething.app
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:
Your complete test report
Screenshots
No response
Steps to Reproduce
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
The text was updated successfully, but these errors were encountered: