Nightwatch: safaridriver v12 /displayed endpoint doesn't work

Created on 20 Jun 2019  路  7Comments  路  Source: nightwatchjs/nightwatch

Hello. I read a lot of information but didn't find an answer to it. I use safaridriver v12 and nightwatch 1.1.12. When I run my tests I see the error message
Error while running .isElementDisplayed() protocol action: The command 'GET /session/ID/element/ID/displayed' was not found.
Could somebody help with it?

Most helpful comment

... or you can replace ...Visible methods with ...Present and appropriate CSS checks.

All 7 comments

Safari v12 WebDriver supports the W3C endpoints by default. displayed endpoint isn't supported in this mode.

Try to use legacy JSON Wire protocol with safaridriver's --legacy option and Nightwatch setting:

webdriver: {  use_legacy_jsonwire: true  }

It doesn't work. When I tried to run it in legacy mode there was a message:
--w3c and --legacy options no longer have any effect, and may be removed in the future. safaridriver only supports the protocol as defined by the W3C WebDriver specification.

Well... then the only thing that remains is to contact Safari support service
and try to convince them to re-enable displayed endpoint in w3c mode.
Chromedriver team has implemented this wish.

Seems yes. Thanks for the help

... or you can replace ...Visible methods with ...Present and appropriate CSS checks.

It is a good idea actually :) Really! Thanks. I tried to replace all methods into Present and this issue is gone but another one appeared. I don't know why but now Safari says Error while running .clickElement() protocol action: The requested element is not pointer or keyboard interactable. Do you know why?

Maybe DOM element is not yet visible for "interaction" - has right CSS but is not yet rendered from the browser's point of view. Make short pause before click.

Was this page helpful?
0 / 5 - 0 ratings