The error i’m seeing is cannot load node configuration into grid.
My nodeconfig.json file is as below:
{
“capabilities”:
[{
“version”: “6.0.1”,
“maxInstances”: 1,
“platform”: “ANDROID”,
“device”: “02157df2da093230”,
“browserName”: “Android”
}],
"configuration":
{
"cleanUpCycle": 2000,
"timeout": 30000,
"hub": "http://localhost:4444/grid/register/",
"host": "localhost",
"maxSession": 5,
"port": 4723,
"hubPort": 4444,
"hubHost": "localhost",
"url": "http://localhost:4723/wd/hub",
"remoteHost": "http://0.0.0.0:4723",
"register": true,
"registerCycle": 5000,
"role": "node"
}
}}
Anything wrong with the above json file?
Also, i’m using Selenium standalone jar 2.53.1 and appium 1.4.13. Please help.
Reference YouTube video link :-
Reference code code:-
My code in Eclipse :-
public void sagemaxconnect(String port,String device) throws MalformedURLException, InterruptedException{
for (int i = 0; i<=100 ;i++)
{
System.out.println("iteration "+i+" started" );
DesiredCapabilities capability =new DesiredCapabilities();
capability.setCapability("noReset","true");
capability.setCapability("fullReset","false");
capability.setCapability("deviceName","Nexus 5");
capability.setCapability("plateformName","Android");
capability.setCapability("plateformVersion","6.0.1");
capability.setCapability("appPackage", "com.echostar.ha.sageApp");
capability.setCapability("appActivity","com.echostar.ha.sageApp.SageMainUiActivity");
capability.setCapability(MobileCapabilityType.DEVICE_NAME, device);
driver = new AndroidDriver<>(new URL("http://localhost:"+port+"/wd/hub"), capability);
File file = new File("C:\\Users\\navjit.singh\\workspace\\SageMaxClientproject\\apk\\SageHAApp_final.apk");
capability.setCapability(MobileCapabilityType.APP, file);
/*capability.setCapability("app",file.getAbsolutePath());*/
/*androidDriver = new AndroidDriver<>(new URL("http://192.168.71.142:4723/wd/hub"), capability);
*/
Thread.sleep(30000);
androidDriver.findElement(By.id("com.echostar.ha.sageApp:id/sage_cameras_button")).click();
Thread.sleep(30000);
System.out.println("iteration "+i+" stop");
}
driver.quit();
}
}
Thankyou. I will go through the video and try it again.
If you want the code also i can share