agoff
agoff

Reputation: 7125

Setup Required to Run TestCafe tests on Safari browser

I'm attempting to execute a TestCafe suite on locally installed Safari. I have previously executed the tests on chrome, chrome:headless, firefox, and firefox:headless. When running the command testcafe --list-browsers to retrieve my list of installed browsers, I receive the following:

testcafe --list-browsers
Using locally installed version of TestCafe.
firefox
chrome
safari

When I execute a simple test via command line, testcafe safari path/to/tests/, the Safari browser will launch, but no navigation takes place. I remain on the launch window (showing my favorites and recently visited pages). When the same command is executed for a different browser (say, testcafe chrome path/to/tests/), the tests are executed in the local browser.

Am I missing something that is required to get Safari up and running with TestCafe? I'm using TestCafe version 1.6.1. I'm not seeing any additional setup mentioned on the TestCafe documentation...

Upvotes: 1

Views: 1141

Answers (1)

agoff
agoff

Reputation: 7125

I was able to resolve this issue by disabling all uses of TestCafe Browser Tools in System Preferences -> Security & Privacy -> Privacy -> Automation. On my subsequent execution, I was prompted to allow TestCafe Browser Tools for Safari. After accepting the prompt, the tests ran as expected.

I also had deleted my node_modules directory and reinstalled dependencies, although I'm skeptical if that helped.

Upvotes: 5

Related Questions