-1

I am not able to run selenium with mac 10.11 and safari 9. Error is : org.openqa.selenium.WebDriverException: SafariDriver requires Safari 10 running on OSX El Capitan or greater.

Configuration I used are : Selenium : 2.45.0; 2.48.0 Safari browser version : 9.1.3 Mac OS 10.11.6 OS X El Capitan Java JDK : 1.8

Safari extension I used is from 2.45 or 2.48 selenium from link http://selenium-release.storage.googleapis.com/index.html and have installed safari extension in safari. I am using maven to download selenium.

Any pointers is appreciated.

jayant
  • 366
  • 4
  • 14
  • Did it used to work? Did you try to diagnose this at all? There is not enough information present to help you. – Brian Burg Aug 10 '17 at 18:41

2 Answers2

0

Well the exception says
org.openqa.selenium.WebDriverException: SafariDriver requires Safari 10 running on OSX El Capitan or greater.

And you said you are using:

Safari browser version : 9.1.3

I'd say you have to update your browser.

Robert G
  • 928
  • 7
  • 9
  • Thanks for simple answer though not what I am looking for .. I have to run in Safari 9 and not Safari 10. – jayant Feb 24 '17 at 19:15
0

I was also facing issues in initiating safari browser on mac machine, and below solution helped me. I am using Java 8, Selenium Webdriver, TestNG, Page Object Model, Page Factory in my GUI automation framework.

if (browserType.equals("safari")) {
            // System.setProperty("webdriver.safari.driver", workingDir +
            // "//driver//SafariDriverServer.exe");
            System.setProperty("webdriver.safari.driver",
                    "/driver/SafariDriver.safariextz");
            System.setProperty("webdriver.safari.noinstall", "true");
            DesiredCapabilities desiredCapabilities = DesiredCapabilities
                    .safari();
            SafariOptions safariOptions = new SafariOptions();
            safariOptions.setUseCleanSession(true);
            safariOptions.getUseCleanSession();
            safariOptions.setUseCleanSession(true);
            desiredCapabilities.setCapability(SafariOptions.CAPABILITY,
                    safariOptions);

            // deleteCookies();
            driver = new EventFiringWebDriver(new SafariDriver());

            ThreadDriver.set(driver);
            // driver.manage().window().setSize(new Dimension(1024, 850));
            getDriver().manage().timeouts().implicitlyWait(3,
                    TimeUnit.SECONDS);
            wait = new WebDriverWait(driver, 30);
        }
Khyati Sehgal
  • 375
  • 1
  • 6
  • 21