Skip to content
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

TestCafe requires screen capture permission on MacOS when disableScreenshots is true #7019

Closed
vergilfromadyen opened this issue May 10, 2022 · 3 comments
Labels
TYPE: enhancement The accepted proposal for future implementation.

Comments

@vergilfromadyen
Copy link
Contributor

vergilfromadyen commented May 10, 2022

What is your Scenario?

Some environments cannot easily provide screen capture permissions to TestCafe. An example would be org-managed MacOS (since Monterey) instances configured in ways that would make it necessary for TestCafe to be codesigned and installed on a predictable path. This is of course possible but difficult to manage if there are many versions of TestCafe used across projects on the same machine.

Disabling screen capturing and video recording seems like an obvious way to work around the permission check while retaining access to the core features of TestCafe.

What is the Current behavior?

Setting disableScreenshots: true and keeping video options disabled still requires screen capture permissions. In the cases where it's not possible to grant screen capture permissions, TestCafe is virtually unusable.

What is the Expected behavior?

Setting disableScreenshots: true disables the check for screen capture permissions on MacOS

What is your public website URL? (or attach your complete example)

What is your TestCafe test code?

fixture`Open anything`.beforeEach(async (t) => {
    await t.navigateTo('https://testcafe.io/');
});
test.only('Empty test', async (t) => {
    await t.expect(true).eql(true);
});

Your complete configuration file

{
  "skipJsErrors": true,
  "disableScreenshots": true,
  "compilerOptions": {
    "typescript": {
      "configPath": "tsconfig-testcafe.json"
    }
  }
}

Your complete test report

No response

Screenshots

No response

Steps to Reproduce

  1. Run a MacOS instance
  2. Create an empty test suite
  3. Run TestCafe with disableScreenshots: true

TestCafe version

1.8.4

Node.js version

No response

Command-line arguments

testcafe chrome test.js

Browser name(s) and version(s)

No response

Platform(s) and version(s)

No response

Other

No response

@vergilfromadyen vergilfromadyen added the TYPE: bug The described behavior is considered as wrong (bug). label May 10, 2022
@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label May 10, 2022
@miherlosev
Copy link
Contributor

Hi @vergilfromadyen,

Thank for pointing this out. We will research ways to improve setting permissions on macOS.

@miherlosev miherlosev added TYPE: enhancement The accepted proposal for future implementation. and removed TYPE: bug The described behavior is considered as wrong (bug). labels May 16, 2022
@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label May 16, 2022
@vergilfromadyen
Copy link
Contributor Author

vergilfromadyen commented May 16, 2022

Hi @miherlosev, I already opened a #7028 PR but I couldn't set up my machine in a way that tests would run correctly, hopefully this way you don't need any research :) but let me know if you need more help with this.

Edit: just say tickets have a needs response flag unless you've answered last, sorry about this.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label May 16, 2022
@AndreyBelym
Copy link
Contributor

Thank you for your feedback. Unfortunately, avoiding the Screen Capture permission only won't help you much - you still have to deal with the Automation permission when TestCafe starts a browser. I've shared more details in a comment to your PR: #7028 (comment).

Also, this issue is actually a duplicate: #6789. Let's continue our discussion there.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TYPE: enhancement The accepted proposal for future implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants