How to Allow Mac Screen Recording for Github Action (Testcafe)

Viewed 1204

I'm trying to set up e2e testing for an Electron app in GitHub Actions.

We've had this working with Travis for a while (I haven't been able to find what Travis does to deal with this). But the GitHub action is just halting at the request for screen recording permission prompt (which we cannot deal with as on CI).

TestCafe requires permission to record the screen. Open 'System Preferences > Security & Privacy > Privacy > Screen Recording' and check 'TestCafe Browser Tools' in the application list.

Press any key to retry.
ERROR UnableToAccessScreenRecordingAPIError: The find-window process cannot access the Screen Recording API.
    at runFindWindowBinary (/Users/runner/runners/2.165.2/work/safe-network-app/safe-network-app/node_modules/testcafe-browser-tools/src/api/find-window.js:29:19)

Anyone successfully managed to get a GitHub Action running on mac for this?

Some large and varied googling hasn't turned up anything of much use thus far.

Any help/pointers would be massively appreciated.

1 Answers
Related