Reputation: 692
I am having a selenium code which is running successfully on Windows 7 for Safari Browser but when i running similar code in MAc Machine in Safari Browser.
But i am getting error. It is opening new Safari Browser but not hitting the URL. My piece of code is:=
WebDriver driver = new SafariDriver();
driver.get("http://www.google.com");
I have also gone through the official website but that is also not working.
Error i am getting is:-Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Failed to connect to SafariDriver after 45092 ms
Upvotes: 0
Views: 3204
Reputation: 605
The old SafariDriver implementation is no longer maintained and should not be used. You do not need to download anything besides Safari 10 to get the Apple-developed driver. This article explains everything https://webkit.org/blog/6900/webdriver-support-in-safari-10/
Upvotes: 0
Reputation: 1
On MAC-System, in Safari browser -safari webdriver will be installed by default.To make selenium scripts to run on safari browser you have to make following settings in browser:
Provide the default setting for the Selenium Webdriver Extension:
Safari Webdriver setup():
WebDriver driver = new SafariDriver();
driver.get("http://www.google.com");
Now all the settings are done and now we should be able to launch our Selenium scripts using Safari browser
Upvotes: 0