1

In one of test steps before clicking some element I use selenium

ExpectedConditions.elementToBeClickable(element)

This method checks visibility by verifying that element is displayed

element.isDisplayed()

Tests are run on browserstack.

Note, that with combination OS X High Sierra + Safari 11 this step pass. But with Mojave + Safari 12 after element is found and request
/session/:sessionId/element/:id/displayed is sent I see in selenium log responce "unknown command":

{"value":{"error":"unknown command","message":"The command 'GET \/session\/CD43B950-D8D6-49A4-A0FF-3F459F1F6D86\/element\/node-E721541C-713B-4607-8041-C79138E08704\/displayed' was not found.","stacktrace":""}}

Here I see that such request ("displayed") is missing: https://developer.apple.com/documentation/webkit/macos_webdriver_commands_for_safari_12_and_later?language=objc

So, the question: Is it possible use element.isDisplayed() with Safari 12? Am I miss something? If it's impossible, please share possible workarounds. Thanks

Update. From apple support:

Please know that our engineering team has determined that this issue behaves as intended based on the information provided.

If you need element.isDisplayed(), we recommend that you copy the atom into your repository and run it via Execute Script command. This is what later versions of Selenium libraries have started doing, because drivers do not necessarily ship it any more.

Clarification: In my tests selenium 2.52 is used

kate
  • 11
  • 3
  • why can't you try Is Element Enabled if you wish to clickable instead of isDisplayed? – murali selenium Dec 26 '18 at 11:35
  • @DebanjanB looks this question mostly related to new version where isDisplayed is not available and duplicated question is something different. cross check once – murali selenium Dec 26 '18 at 11:38
  • @muraliselenium, thank you for alternative, I'll try it. And you right, the question is about safaridriver 12 mostly. I didn't find any information how to use isDisplayed with Safari 12. – kate Dec 26 '18 at 11:50

0 Answers0