1

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...

agoff
  • 5,818
  • 1
  • 7
  • 20
  • 1
    There are no special settings for Safari. I suggest you try the latest TestCafe version. – Dmitry Ostashev Apr 27 '20 at 14:02
  • I'm unable to use the latest version of TestCafe due to Node restrictions with the project. Looking through the documentation related to post-1.6.1 releases, there was nothing indicating the Safari setup changed. – agoff Apr 27 '20 at 16:18

1 Answers1

5

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.

agoff
  • 5,818
  • 1
  • 7
  • 20