automatictester

my thoughts on test automation

Selenium WebDriver can’t run tests in Safari after upgrade to 7.1

If you (a) do Selenium test automation targeting OS X platform, and (b) recently upgraded your Safari browser to 7.1 version, you must have noticed it no longer works.

Once test starts to execute in a browser, error message is displayed: Unable to establish a connection with the SafariDriver extension

safari_driver

There is already a Selenium issue #7933 for that. No fix so far, however a manual workaround is available:

  • download SafariDriver jar, most recent version can be found in Maven repo, currently this is 2.43.1
  • extract content of the jar: jar xf selenium-safari-driver-2.43.1.jar
  • go to org/openqa/selenium and double-click SafariDriver.safariextz

Problem solved. You will need to do that once on every machine you run your tests in Safari.

What is interesting in this situation, is that there is no clear communication between those who develop the browser, and those who develop browser-specific WebDriver. This is very similar to problems with IE11 once it was released (that problem is already sorted).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: