Search code examples
macossecuritytestingautomated-teststestcafe

'TestCafe Browser Tools' wants to access 'Google Chrome'. Mac security popup issue. Is there a settings in Mac to always allow?


On Mac (Mojave 10.14.6) CI machine, any time I upgrade TestCafe to the latest version and run a test job, I get this Mac permission popup (see screenshot). I have to manually log into that machine and click 'Allow' to get rid of this popup for the test job to launch a chrome browser otherwise it fails.

Is there a setting in Mac to make always allow/give access to control?

enter image description here

UPDATE: I did provide permission to 'TestCafe Browser Tools' in the settings but that doesn't seem to help. (see screenshot

enter image description here


Solution

  • TestCafe Browser Tools is a special helper app used by TestCafe 1.6.0 and newer. TestCafe uses it for features that access operating system APIs like taking screenshots, opening, closing and resizing browser windows and so on.

    Using a dedicated app for such functionality is necessary for providing a convenient way to obtain the new 'Screen Recording' security permission introduced in macOS 10.15 Catalina, but it also delivers more secure permission management for the older macOS versions as well.

    The first drawback of using the TestCafe Browser Tools app is that you have to give permissions to the app when you upgrade to TestCafe 1.6.0 from the older TestCafe versions. Another drawback is that macOS can reset permissions granted to TestCafe and show the permission dialog again if the app's content is changed after an update.

    We have to apply hotfixes to TestCafe Browser Tools used in TestCafe 1.6.1 and 1.7.0. It means that permissions can be requested again when you upgrade to these versions.

    But TestCafe Browser Tools shipped with TestCafe 1.7.0 can be considered stable and we won't change it frequently in the future TestCafe versions. It means that you will not see additional permission dialogs starting from TestCafe 1.7.0.