12

does anybody have a problem of selenium tests failing on new safari version 13. Ran the same tests on chrome and firefox and it works fine. Also tested it on older version of safari and it works fine.

I didn't manage to pin point exactly where it fails. One case I did notice is that on safari 13 selenium click on <div role='button' aria-haspopup='true'>....</div> invokes no action(in my case opens a popup menu). And test proceeds to the next line of code. note however at this point I am not claiming that this kind of click always fails, it's just where I noticed it in my tests.

If anyone came across this kind of issue on safari 13 please provide your input. Thanks

mihajloK
  • 131
  • 1
  • 4
  • Which version of Safari are you using (including minor and patch versions) and which version of the Safari web driver are you using? – Greg Burghardt Sep 24 '19 at 14:34
  • same problem here with clicks – iojancode Sep 27 '19 at 00:05
  • To avoid deletion I'm going to repeat my answer below here: Raised defect with Selenium: https://github.com/SeleniumHQ/selenium/issues/7649 . They say it is for Apple to fix, and we have since discovered there is a defect in `WebKit` too: https://bugs.webkit.org/show_bug.cgi?id=202589 – Ron Kalian Oct 09 '19 at 12:05
  • The same happens with Appium/Safari where iOS is version 13.x (as Safari's version matches the underlying iOS version). – Ron Kalian Oct 16 '19 at 10:56
  • This seems to be broken with Appium where iOS is version 13.0.0-13.2, but fixed on iOS 13.2.2. Tested with Appium 1.16 beta. – Ron Kalian Nov 12 '19 at 10:46
  • @RonKalian I can confirm this. On 13.2 everything runs fine. – gazzo Dec 19 '19 at 14:07
  • This is resolved with this mentioned setup. MacOS: Catalina 10.15.4 | Safari: 13.1 (15609.1.20.111.8) | Selenium: 3.141.59 | Scripting Language: Java 1.8 – Vikrant Kumar May 13 '20 at 20:42

3 Answers3

5

Safaridriver maintainer here.

This is a known issue that we believe has already been fixed in Safari Technology Preview Release 91. Please verify whether the issue reproduces using latest STP's safaridriver, and reach out to me on Twitter, @brrian.

Brian Burg
  • 795
  • 4
  • 10
4

I am also facing the same issue with Safari 13.0 and Safari 13.0.1. Till Safari 12.1.2 everything was working as expected but since my browser updated to v13.0 selenium script is broken.

I observed that Selenium clicks on other locator instead of the target (identified) locator. For ex. if you want to click on a button (//button) it clicks on the //div which is the sibling node of that //button in the DOM.

My workaround solution: As I didn't update MacOS Catalina yet and only Safari 13 was updated; I was able to download the "MacOS Mojave installer". Then, I installed it as an update; resulting it rolled back my Safari version from 13.0 to Safari 12.1.2. Now my script started working again!!

  • Update: As per bug fix (https://bugs.webkit.org/show_bug.cgi?id=202589) now I am able to proceed with Selenium java script. I am using Safari Technology Preview 98. – Vikrant Kumar Jan 17 '20 at 22:57
  • Another update: I had raised another issue 'bugs.webkit.org/show_bug.cgi?id=209780' and it's already fixed. Now you can proceed with automation testing on Safari 13.1 with this setup. MacOS: Catalina 10.15.4 Safari: 13.1 (15609.1.20.111.8) Selenium: 3.141.59 Scripting Language: Java 1.8 – Vikrant Kumar May 13 '20 at 20:39
3

There is an issue with SafarDriver or Safari 13. Please vote the bug in WebKit https://bugs.webkit.org/show_bug.cgi?id=202589