Jai
Jai

Reputation: 319

WebDriver Java class to run on Safari 10 on El Capitan

I installed updates on El Capitan OS X to get Safari 10. Per webdriver-support-in-safari-10 - "Safari’s driver is launchable via the /usr/bin/safaridriver executable, and most client libraries provided by Selenium will automatically launch the driver this way without further configuration."

Since the Java client still needs to instantiate a flavor of WebDriver, I tried the following -

DesiredCapabilities capabilities = DesiredCapabilities.safari();
capabilities.setCapability(SafariOptions.CAPABILITY, new SafariOptions());
driver = new RemoteWebDriver(capabilities);

instead of

driver = new SafariDriver();

but I run into the following error - org.openqa.selenium.remote.UnreachableBrowserException. I see

ps -ef | grep safari
501  1956   814   0  5:12PM ttys003    0:00.02 /usr/bin/safaridriver -p 0

I also checked the "Addendum" at the end of their post -

launchctl list | grep webdriverd
1498    0   com.apple.webdriverd

Has anyone been able to get it to work with Java?

Upvotes: 2

Views: 1026

Answers (1)

user2846469
user2846469

Reputation: 2220

Update to Safari 10.0.2 beta 2 from the Apple developer channel. For me, it didn't work with 10.0.1 and did work with 10.0.2 beta 2.

Upvotes: 0

Related Questions