Getting the following exception when trying to run the selenium tests on Mac- Safari using Selenium Grid. I could see the safari browser on Hub console, but when running the tests getting the exception.

System.InvalidOperationException: Failed to connect to SafariDriver after 10357 ms

Safari Extension version : 2.48 and 
Selenium Stand alone server : 2.53


DesiredCapabilities ds = new DesiredCapabilities();
ds.SetCapability(CapabilityType.BrowserName, "safari");
ds.SetCapability(CapabilityType.Platform, "MAC");

Could anyone help/guide me in resolving the issue

  • My first guess would be that the browser name is case sensitive, given that the error message is using "Safari" and not "safari".
    – Kate Paulk
    Apr 11, 2016 at 12:21

1 Answer 1

public class Selenium_Grid
       WebDriver driver;
       String baseUrl, nodeUrl;

       public void setUp() throws MalformedURLException
           baseUrl = "www.fb.com/";
           nodeUrl = "";
           DesiredCapabilities capibility = DesiredCapabilities.safari();
           driver = new RemoteWebDriver(new URL(nodeUrl), capibility);


       public void tearDown()


Try with this-


  1. use proper parameters that you have used in your code.
  2. check whether node is successfully connected or not with your Hub.
  3. use different port no of Hub & node.
  • @Swapna, Have you tried with this ?
    – Bharat Mane
    Apr 11, 2016 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.