1

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?

JordanBarber
  • 2,041
  • 5
  • 34
  • 62
  • What version of Safari? – QualiT Aug 12 '19 at 17:21
  • Hey thanks I'm running version 12 – JordanBarber Aug 12 '19 at 17:57
  • I've yet to get Safari 12 working with Selenium. The implementation of the Safari 12 WebDriver now supports the W3C endpoints by default, which may be causing issues. Previously I was able to use the --legacy argument but that no longer works. Your best bet is keeping up with the latest Nightwatch version, or researching some other workaround that I was unable to find. I'm watching this thread in case you solve it. – QualiT Aug 13 '19 at 21:27

1 Answers1

0

If you used Appium and the XCUITest driver as your WebDriverAgent then you can use browser.execute('mobile:gesture',{arguments}) to replace all the 'Element Interaction' commands. The full list of gestures can be found here For the command like waitForElementVisible(), you can use the assertions commands instead (in my case I have used assert.visible('element css selector')). Hope they will change things in NightWatch v2 but for now we can only work around that

NJacques
  • 11
  • 2