Search code examples
seleniumselenium-webdriversafariwebdriverbrowserstack

Why does Selenium give Safari 11's version as 13605?


I'm using BrowserStack for Selenium testing and sending this set of capabilities for testing with Safari 11:

os=OS X
os_version=High Sierra
browser=Safari
browser_version=11

But when I check the browser properties in Java code...

System.out.println("Browser is: " + driver.getCapabilities().getBrowserName());
System.out.println("Version is: " + driver.getCapabilities().getVersion());
System.out.println("Platform is: " + driver.getCapabilities().getPlatform());

I get this:

Browser is: safari
Version is: 13605.3.8
Platform is: MAC

Other browsers like Chrome, Firefox, Edge, and IE give me the kinds of version numbers I'd expect. So does Safari 12: 12.1.1.

So where does this 13605 for Safari 11 come from?


Solution

  • As you are using Safari v11 and driver.getCapabilities().getVersion() is returning 13605.3.8 it seems to be a bug.

    As per MacUpdate one of the past version of Safari was:

    Version 12.0, released Sep 18, 2018
    

    and the previous version to it was:

    Version 11.1.2: (13605.3.8)
    

    Of coarse getVersion() should have extracted 11.1.2