Details:
Windows version: 10 , 64 bit
MAC: macOS Sierra 10.12.5
Safari: 10.1.1
Selenium: 3.4.0
Started hub on Windows machine with below command and successfully started
java -jar selenium-server-standalone-3.4.0.jar -role hub -port 4444
Started node on MAC machine with below command and successfully started
java -jar selenium-server-standalone-3.4.0.jar -role node -nodeConfig mac.json
mac.json content is
{
"capabilities":
[
{
"browserName": "safari",
"maxInstances": 5,
"seleniumProtocol": "WebDriver"
},
{
"browserName": "firefox",
"maxInstances": 5,
"seleniumProtocol": "WebDriver"
},
{
"browserName": "chrome",
"maxInstances": 5,
"seleniumProtocol": "WebDriver"
},
{
"browserName": "internet explorer",
"maxInstances": 1,
"seleniumProtocol": "WebDriver"
}
],
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"maxSession": 5,
"port": 5555,
"register": true,
"registerCycle": 5000,
"hub": "http://192.101.3.23:4444",
"nodeStatusCheckTimeout": 5000,
"nodePolling": 5000,
"role": "node",
"unregisterIfStillDownAfter": 60000,
"downPollingLimit": 2,
"debug": false,
"servlets" : [],
"withoutServlets": [],
"custom": {}
}
Selenium Java code to invoke browser is
capability = DesiredCapabilities.safari();
capability.setBrowserName("safari");
capability.setPlatform(Platform.MAC);
SafariOptions options = new SafariOptions();
options.setUseCleanSession(true);
capability=DesiredCapabilities.safari();
capability.setCapability(SafariOptions.CAPABILITY, options);
capability.setPlatform(Platform.ANY);
driver=new RemoteWebDriver(new URL(http://192.101.1.23:5555),capability);
On executing the below line for Safari browser
driver=new RemoteWebDriver(new URL(http://192.101.1.23:5555),capability);
Throwing an exception
java.lang.reflect.InvocationTargetException
I am unable to proceed to, did i missed anything, what is not allowing me to proceed further, can any one help please.
Updated the Selenium Java code as below, and is working fine
capability = DesiredCapabilities.safari();
driver=new RemoteWebDriver(new URL(http://192.101.1.23:5555),capability);