Cannot Run Nightwatch Tests in Safari
Asked 07 September, 2021
Viewed 2.5K times
  • 55
Votes

I have followed all instructions in the Nightwatch docs and followed many issues in github. I believe I have the correct setup in my nightwatch.json for safari. Safari does launch when I run a test against it but then all the commands in my test fail. For example I have a global beforeEach to resize the browser window which works great in Firefox and Chrome but fails in Safari with

The command 'POST /session/FA198F5F-EE09-4129-9FF0-F55FEA0EE6F0/window/current/size' was not found.

If I remove that then the first step in my test (which is a waitForElementVisible test fails with the error of

The command 'GET /session/FA198F5F-EE09-4129-9FF0-F55FEA0EE6F0/element/node-F5A12DD5-2557-4AE6-806A-0A0B99B63EFC/displayed' was not found.

Again, I'm certain my config is setup properly as nightwatch is launching the safari browser but then failing on the test commands. I have enabled safaridriver and checked 'Allow Remote Automation' but everything still fails. Has anyone run into this issue?

0 Answer