user3866016 user3866016 - 6 months ago 52
Java Question

How to launch Safari with Selenium WebDriver using Java

I have successfully installed safari developer certificate for safari driver. I have been built and added to safari extensions builder. The presteps are done. However when I run my selenium scripts, the safari server starts on a port and then I get following error in my eclipse console as shown below:

Oct 27, 2014 3:49:37 PM org.openqa.selenium.safari.SafariDriverServer start
INFO: Server started on port 22131
java.lang.IllegalAccessError: tried to access method<init>()V from class org.openqa.selenium.safari.SafariDriverCommandExecutor
at org.openqa.selenium.safari.SafariDriverCommandExecutor.start(
at org.openqa.selenium.safari.SafariDriver.startClient(
at org.openqa.selenium.remote.RemoteWebDriver.<init>(
at org.openqa.selenium.remote.RemoteWebDriver.<init>(
at org.openqa.selenium.safari.SafariDriver.<init>(
at org.openqa.selenium.safari.SafariDriver.<init>(

The safari browser open with giving error "Safari cant Find the File"

Any help would be appriciated


Setting up Selenium tests to run on Safari browser is a fairly complex process. You need to install Safari Extensions Developer Certificate in your machine and also install selenium webdriver as an extension in Safari Browser.

Also there are some stability issues with Safari browser automation & Selenium combination on Mac 10.9 OS and below. The stability is much better on Mac Yosemite OSX & Safari 8.0.x combination along with Selenium v2.45.0

Detailed steps for the setup can be seen here