RemoteWebDriver for Safari:

URL HubUrl;
try 
{
    HubUrl = new URL(seleniumHubUrl);
} catch (MalformedURLException e1) {
    throw new ConfigurationException("The url for the selenium hub is invalid");
}
DesiredCapabilities saCapabilities = DesiredCapabilities.safari();
saCapabilities.setCapability("safari.port", 33245);
saCapabilities.setJavascriptEnabled(true);
saCapabilities.setBrowserName(DesiredCapabilities.safari().getBrowserName());
driver = new RemoteWebDriver(HubUrl,saCapabilities);
share me!:))Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone
Print this page