Unable to start selenium grid properly within java code to perform parallel test

145 views
Skip to first unread message

akamel...@gmail.com

unread,
May 3, 2019, 9:44:48 AM5/3/19
to Selenium Users
Im trying to start selenium grid programmatically but i have and issue dont know exactly how to solve it.

im running appium test using page object model and appium server start programmatically in two sessions for two android devices and its working properly when i open selenium grid from terminal using the common code "java -jar selenium-server-standalone-3.141.59.jar -role hub
but now i want to start also selenium grid within my script so once its initiated appium server it will detect the localhost and register the node config files ,perform the test and after test is finished appium server will stop then selenium grid session will be terminated as well.

also im wondering why i have to set config for selenium grid? can i start it in default configuration like if "java -jar selenium-server-standalone-3.141.59.jar -role hub
" since already node config are loaded with the appium server.
Enter code here...package Configuration;


import android.graphics.drawable.Animatable;

import org.openqa.grid.web.Hub;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.server.SeleniumServer;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.Parameters;

import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.TimeUnit;

import io.appium.java_client.MobileElement;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.remote.AndroidMobileCapabilityType;
import io.appium.java_client.remote.MobileCapabilityType;
import io.appium.java_client.service.local.AppiumDriverLocalService;
import io.appium.java_client.service.local.AppiumServiceBuilder;
import io.appium.java_client.service.local.flags.ServerArgument;


public class BaseSetup extends GridHub {

protected static AndroidDriver<MobileElement> driver = null;
protected AppiumDriverLocalService service;
public WebDriverWait wait;
private ThreadLocalDriver threadLocalDriver = new ThreadLocalDriver();
private SeleniumServer hub;


@Parameters({"deviceName","platformVersion","udid","URL_","Sport","deviceId","sysPort","bootStrap","wdaPort","path"})
@BeforeMethod(alwaysRun = true)
public void setUp (String deviceName, String platformVersion, String udid, String URL_, String Sport, String deviceId, String sysPort, String bootStrap, String wdaPort, String path) throws Exception {

System.out.println("Driver Is Initiated");
DesiredCapabilities dc = new DesiredCapabilities();

// Mobile setup
dc.setCapability(MobileCapabilityType.DEVICE_NAME, deviceName);
dc.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android");
dc.setCapability(MobileCapabilityType.PLATFORM_VERSION, platformVersion);
dc.setCapability(AndroidMobileCapabilityType.SYSTEM_PORT, sysPort);
dc.setCapability("appium:unlockType", "password");
dc.setCapability("appium:unlockKey", "@ghhb");
// dc.setCapability(MobileCapabilityType.UDID,udid_);
// dc.setCapability(MobileCapabilityType.AUTOMATION_NAME, "uiautomator2"); // Make the test fail after first tear down
// dc.setCapability("appium:uiautomator2ServerInstallTimeout", "8000");


// Application setup
dc.setCapability(AndroidMobileCapabilityType.APP_PACKAGE, "cjgghg");
dc.setCapability(AndroidMobileCapabilityType.APP_ACTIVITY, "cjh");
dc.setCapability(AndroidMobileCapabilityType.AUTO_GRANT_PERMISSIONS,"true");
dc.setCapability(MobileCapabilityType.CLEAR_SYSTEM_FILES, true);


// Driver configuration
// int port = Integer.parseInt(Sport); //need when use function .using
service = AppiumDriverLocalService
.buildService(new AppiumServiceBuilder()
.usingDriverExecutable(new File("/usr/local/bin/node"))
.withAppiumJS(new File("/Applications/Appium.app/Contents/Resources/app/node_modules/appium/build/lib/main.js"))
.withArgument(Arg.ADDRESS,URL_)
.withArgument(Arg.PORT,Sport)
.withArgument(Arg.CALLBACKPORT,Sport)
.withArgument(Arg.WDALOCALPORT,wdaPort)
.withArgument(Arg.BootstrapPort,bootStrap)
.withArgument(Arg.NODECONFIG,path)
.withArgument(Arg.SESSIONOVERRIDE));
service.start();
Thread.sleep(7000); // Needed for appium server to wait for selenium grid to register the node
driver = new AndroidDriver (new URL("http://localhost:4444/wd/hub"), dc);
Thread.sleep(5000);
// threadLocalDriver.setTLDriver(new AndroidDriver<MobileElement>(new URL("http://"+URL_+":"+Sport+"/wd/hub"),dc));
// threadLocalDriver.setTLDriver(new AndroidDriver<MobileElement>(new URL("http://localhost:4444/wd/hub"),dc));
// driver = threadLocalDriver.getTLDriver();
// wait = new WebDriverWait(driver, 10);
}

@AfterMethod
public void tearDown(){
if (driver != null)
driver.quit();
System.out.println("Driver quit");

}

// @AfterMethod
// public synchronized void teardown() {
// if (driver != null)
// driver.quit();
// }
}



GridHub class

Enter code here...
package Configuration;

import org.openqa.grid.common.GridRole;
import org.openqa.grid.common.RegistrationRequest;
import org.openqa.grid.internal.utils.GridHubConfiguration;
import org.openqa.grid.internal.utils.SelfRegisteringRemote;
import org.openqa.grid.selenium.proxy.DefaultRemoteProxy;
import org.openqa.grid.web.Hub;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.server.SeleniumServer;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.Parameters;

import java.net.URL;
import java.util.HashMap;
import java.util.Map;

public class GridHub {

@BeforeClass
@Parameters({"deviceName","platformVersion","udid","URL_","Sport","deviceId","sysPort","bootStrap","wdaPort","path"})
public static void main(String deviceName, String platformVersion, String udid, String URL_, String Sport, String deviceId, String sysPort, String bootStrap, String wdaPort, String path) throws Exception {
String strIP = "localhost";

GridHubConfiguration config = new GridHubConfiguration();
config.setTimeout(30000000);
config.setPort(4444);
config.setHost(strIP);

Hub hub = new Hub(config);
hub.start();
RegistrationRequest req = new RegistrationRequest();
req.setRole(GridRole.NODE);
Map<String, Object> nodeConfiguration = new HashMap<>();
// nodeConfiguration.put(RegistrationRequest.PROXY_CLASS, DefaultRemoteProxy.class.getName());
nodeConfiguration.put(RegistrationRequest.CLEAN_UP_CYCLE,2000);
nodeConfiguration.put(RegistrationRequest.TIME_OUT,30000);
nodeConfiguration.put(RegistrationRequest.PROXY_CLASS, "org.openqa.grid.selenium.proxy.DefaultRemoteProxy");
nodeConfiguration.put(RegistrationRequest.SELENIUM_PROTOCOL,"seleniumProtocol");
nodeConfiguration.put(RegistrationRequest.MAX_SESSION, 1);
nodeConfiguration.put(RegistrationRequest.AUTO_REGISTER, true);
nodeConfiguration.put(RegistrationRequest.REGISTER_CYCLE, 5000);
nodeConfiguration.put(RegistrationRequest.HUB_PORT, 4444);
nodeConfiguration.put(RegistrationRequest.HUB_HOST,URL_);
nodeConfiguration.put("remoteHost", "http://" + URL_ + ":"+Sport);
nodeConfiguration.put("url", "http://" + URL_ + ":"+Sport);
nodeConfiguration.put("role", "node");
nodeConfiguration.put("hub", "http://localhost:4444/grid/register");


URL remoteURL = new URL("http://" + URL_ + ":"+Sport);
nodeConfiguration.put(RegistrationRequest.REMOTE_HOST, remoteURL.toExternalForm());

req.setConfiguration(nodeConfiguration);

ChromeOptions capabilities2 = new ChromeOptions() ;
capabilities2.setCapability("deviceName", deviceName);
capabilities2.setCapability("browserName", deviceName);
capabilities2.setCapability("deviceId", deviceId);
capabilities2.setCapability("platform", "Android");
capabilities2.setCapability("version", platformVersion);
capabilities2.setCapability("maxInstances", 1);
capabilities2.setCapability("ensureCleanSession", "true");
req.addDesiredCapability(DesiredCapabilities.chrome());
SelfRegisteringRemote remote = new SelfRegisteringRemote(req);
remote.setRemoteServer(new SeleniumServer(req.getConfiguration()));
remote.startRemoteServer();
remote.startRegistrationProcess();
Thread.currentThread().join();
}
}

TestNg File
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Default Suite" thread-count="2" parallel="tests" verbose="2">
<test name="Note8">
<parameter name="deviceName" value="SM_N950F"/>
<parameter name="udid" value="988a1641434e36333130"/>
<parameter name="deviceId" value="192.168.1.4:5555"/>
<parameter name="platformVersion" value="9"/>
<parameter name="URL_" value="127.0.0.1"/>
<parameter name="Sport" value="4800"/>
<parameter name="bootStrap" value="4725"/>
<parameter name="sysPort" value="8230"/>
<parameter name="wdaPort" value="8230"/>
<parameter name="path" value="/Applications/Appium.app/Contents/Resources/app/node_modules/appium/build/lib/selenium/note8.json"/>
<classes>
<class name="Tests.LandingPageTest"/>
</classes>
</test> <!-- NOTE 8 DEVICE -->
<test name="Note5">
<parameter name="deviceName" value="SM_N9208"/>
<parameter name="udid" value="0715f75124ea0934"/>
<parameter name="deviceId" value="192.168.1.9:5556"/>
<parameter name="platformVersion" value="7.0"/>
<parameter name="URL_" value="127.0.0.1"/>
<parameter name="Sport" value="4956"/>
<parameter name="bootStrap" value="4726"/>
<parameter name="sysPort" value="8240"/>
<parameter name="wdaPort" value="8240"/>
<parameter name="path" value="/Applications/Appium.app/Contents/Resources/app/node_modules/appium/build/lib/selenium/note5.json"/>
<classes>
<class name="Tests.LandingPageTest"/>
</classes>
</test> <!-- NOTE 5 DEVICE -->
</suite> <!-- Default Suite -->

Console log

java.net.BindException: Selenium is already running on port 4444. Or some other service is.

at org.openqa.selenium.server.SeleniumServer.start(SeleniumServer.java:509)
at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:321)
at org.openqa.grid.internal.utils.SelfRegisteringRemote.startRemoteServer(SelfRegisteringRemote.java:102)
at Configuration.GridHub.main(GridHub.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:59)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:458)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:222)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:168)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:105)
at org.testng.TestRunner.privateRun(TestRunner.java:648)
at org.testng.TestRunner.run(TestRunner.java:505)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
at org.testng.SuiteRunner.access$000(SuiteRunner.java:40)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:489)
at org.testng.internal.thread.ThreadUtil$1.call(ThreadUtil.java:52)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

May 03, 2019 2:59:10 PM org.openqa.grid.web.Hub initServer
INFO: Will listen on 4444
May 03, 2019 2:59:10 PM org.openqa.grid.web.Hub initServer
INFO: Will listen on 4444
May 03, 2019 2:59:10 PM org.openqa.grid.web.Hub initServer
INFO: Will listen on 4444
May 03, 2019 2:59:10 PM org.openqa.grid.web.Hub initServer
INFO: Will listen on 4444


May 03, 2019 2:59:10 PM org.openqa.selenium.remote.DesiredCapabilities chrome
INFO: Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`
14:59:10.723 INFO - Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`
14:59:10.726 INFO - Using `new EdgeOptions()` is preferred to `DesiredCapabilities.edge()`
14:59:10.726 INFO - Using `new OperaOptions()` is preferred to `DesiredCapabilities.operaBlink()`
14:59:10.726 INFO - Using `new SafariOptions()` is preferred to `DesiredCapabilities.safari()`
14:59:10.730 INFO - Using `new FirefoxOptions()` is preferred to `DesiredCapabilities.firefox()`
14:59:10.742 INFO - Using `new FirefoxOptions()` is preferred to `DesiredCapabilities.firefox()`
14:59:10.769 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities {browserName: internet explorer, ensureCleanSession: true, platform: WINDOWS, version: } does not match the current platform MAC
14:59:10.769 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
registration capabilities Capabilities {browserName: MicrosoftEdge, platform: WINDOWS, version: } does not match the current platform MAC
14:59:10.770 INFO - Driver class not found: com.opera.core.systems.OperaDriver
14:59:10.770 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
14:59:10.775 INFO - Driver class not found: org.openqa.selenium.htmlunit.HtmlUnitDriver
14:59:10.775 INFO - Driver provider org.openqa.selenium.htmlunit.HtmlUnitDriver is not registered


Appium server Log 

Test ignored.
Driver Is Initiated
[HTTP] --> GET /wd/hub/status
[HTTP] {}
[debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
[debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.12.1"}}
[HTTP] <-- GET /wd/hub/status 200 2 ms - 68
[HTTP] 
[debug] [WD Proxy] Proxying [GET /appium/device/pixel_ratio] to [GET http://localhost:8240/wd/hub/session/e2dcb998-2e31-4841-a692-a9720263b548/appium/device/pixel_ratio] with body: {}
[debug] [WD Proxy] Got response with status 200: "{\"sessionId\":\"e2dcb998-2e31-4841-a692-a9720263b548\",\"status\":0,\"value\":2.625}"
[debug] [WD Proxy] Matched '/appium/device/system_bars' to command name 'getSystemBars'
[debug] [WD Proxy] Proxying [GET /appium/device/system_bars] to [GET http://localhost:8240/wd/hub/session/e2dcb998-2e31-4841-a692-a9720263b548/appium/device/system_bars] with body: {}
[debug] [WD Proxy] Got response with status 200: "{\"sessionId\":\"e2dcb998-2e31-4841-a692-a9720263b548\",\"status\":0,\"value\":{\"statusBar\":63}}"
[debug] [WD Proxy] Matched '/window/current/size' to command name 'getWindowSize'
[debug] [WD Proxy] Proxying [GET /window/current/size] to [GET http://localhost:8240/wd/hub/session/e2dcb998-2e31-4841-a692-a9720263b548/window/current/size] with body: {}
[HTTP] --> GET /wd/hub/status
[HTTP] --> GET /wd/hub/status
[HTTP] {}
[HTTP] {}
[debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
[debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
[debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.12.1"}}
[debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.12.1"}}
[HTTP] <-- GET /wd/hub/status 200 2 ms - 68
[HTTP] 
[HTTP] <-- GET /wd/hub/status 200 2 ms - 68
[HTTP] 
[debug] [WD Proxy] Got response with status 200: "{\"sessionId\":\"e2dcb998-2e31-4841-a692-a9720263b548\",\"status\":0,\"value\":{\"height\":1920,\"width\":1080}}"
[Appium] New AndroidUiautomator2Driver session created successfully, session d90dac97-f78a-4bb1-bade-74ddb83e4ae9 added to master session list
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1556888384157 (14:59:44 GMT+0200 (Central European Summer Time))
[debug] [MJSONWP (d90dac97)] Cached the protocol value 'MJSONWP' for the new session d90dac97-f78a-4bb1-bade-74ddb83e4ae9
[debug] [MJSONWP (d90dac97)] Responding to client with driver.createSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"appActivity":"com.sfdmobile.MainActivity","appPackage":"com.sarajevo.food.dictionary","unlockKey":"@0122882435abA","clearSystemFiles":true,"platformVersion":"7.0","unlockType":"password","automationName":"uiautomator2","autoGrantPermissions":true,"platformName":"Android","deviceName":"SM_N9208","systemPort":8240},"appActivity":"com.sfdmobile.MainActivity","appPackage":"com.sarajevo.food.dictionary","unlockKey":"@0122882435abA","clearSystemFiles":true,"platformVersion":"7.0","unlockType":"password","automationName":"uiautomator2","autoGrantPermissions":true,"platformName":"Android","deviceName":"192.168.1.9:5556","systemPort":8240,"deviceUDID":"192.168.1.9:5556","deviceApiLevel":24,"deviceScreenSize":"1080x1920","deviceScreenDensity":420,"deviceModel":"SM-N9208","deviceManufacturer":"samsung","pixelRatio...
[HTTP] <-- POST /wd/hub/session 200 22547 ms - 1182
[HTTP] 
14:59:44.164 INFO - Detected dialect: OSS
[HTTP] --> GET /wd/hub/session/d90dac97-f78a-4bb1-bade-74ddb83e4ae9
[HTTP] {}
[debug] [MJSONWP (d90dac97)] Calling AppiumDriver.getSession() with args: ["d90dac97-f78a-4bb1-bade-74ddb83e4ae9"]
[debug] [UiAutomator2] Getting session details from server to mix in
[debug] [WD Proxy] Matched '/' to command name 'getSession'
[debug] [WD Proxy] Proxying [GET /] to [GET http://localhost:8240/wd/hub/session/e2dcb998-2e31-4841-a692-a9720263b548] with body: {}
[debug] [WD Proxy] Got response with status 200: "{\"sessionId\":\"e2dcb998-2e31-4841-a692-a9720263b548\",\"status\":0,\"value\":{}}"
[debug] [MJSONWP (d90dac97)] Responding to client with driver.getSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"appActivity":"com.sfdmobile.MainActivity","appPackage":"com.sarajevo.food.dictionary","unlockKey":"@0122882435abA","clearSystemFiles":true,"platformVersion":"7.0","unlockType":"password","automationName":"uiautomator2","autoGrantPermissions":true,"platformName":"Android","deviceName":"SM_N9208","systemPort":8240},"appActivity":"com.sfdmobile.MainActivity","appPackage":"com.sarajevo.food.dictionary","unlockKey":"@0122882435abA","clearSystemFiles":true,"platformVersion":"7.0","unlockType":"password","automationName":"uiautomator2","autoGrantPermissions":true,"platformName":"Android","deviceName":"192.168.1.9:5556","systemPort":8240,"deviceUDID":"192.168.1.9:5556","deviceApiLevel":24,"deviceScreenSize":"1080x1920","deviceScreenDensity":420,"deviceModel":"SM-N9208","deviceManufacturer":"samsung","pixelRatio...
[HTTP] <-- GET /wd/hub/session/d90dac97-f78a-4bb1-bade-74ddb83e4ae9 200 114 ms - 1182
[HTTP] 
[HTTP] --> GET /wd/hub/session/d90dac97-f78a-4bb1-bade-74ddb83e4ae9
[HTTP] {}
[debug] [MJSONWP (d90dac97)] Calling AppiumDriver.getSession() with args: ["d90dac97-f78a-4bb1-bade-74ddb83e4ae9"]
[debug] [UiAutomator2] Getting session details from server to mix in
[debug] [WD Proxy] Matched '/' to command name 'getSession'
[debug] [WD Proxy] Proxying [GET /] to [GET http://localhost:8240/wd/hub/session/e2dcb998-2e31-4841-a692-a9720263b548] with body: {}
[debug] [WD Proxy] Got response with status 200: "{\"sessionId\":\"e2dcb998-2e31-4841-a692-a9720263b548\",\"status\":0,\"value\":{}}"
[debug] [MJSONWP (d90dac97)] Responding to client with driver.getSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"appActivity":"com.sfdmobile.MainActivity","appPackage":"com.sarajevo.food.dictionary","unlockKey":"@0122882435abA","clearSystemFiles":true,"platformVersion":"7.0","unlockType":"password","automationName":"uiautomator2","autoGrantPermissions":true,"platformName":"Android","deviceName":"SM_N9208","systemPort":8240},"appActivity":"com.sfdmobile.MainActivity","appPackage":"com.sarajevo.food.dictionary","unlockKey":"@0122882435abA","clearSystemFiles":true,"platformVersion":"7.0","unlockType":"password","automationName":"uiautomator2","autoGrantPermissions":true,"platformName":"Android","deviceName":"192.168.1.9:5556","systemPort":8240,"deviceUDID":"192.168.1.9:5556","deviceApiLevel":24,"deviceScreenSize":"1080x1920","deviceScreenDensity":420,"deviceModel":"SM-N9208","deviceManufacturer":"samsung","pixelRatio...
[HTTP] <-- GET /wd/hub/session/d90dac97-f78a-4bb1-bade-74ddb83e4ae9 200 37 ms - 1182
[HTTP] 
[Appium] Welcome to Appium v1.12.1
[Appium] Non-default server args:
[Appium]   address: 127.0.0.1
[Appium]   port: 4800
[Appium]   callbackPort: 4800
[Appium]   bootstrapPort: 4725
[Appium]   sessionOverride: true
[Appium]   nodeconfig: /Applications/Appium.app/Contents/Resources/app/node_modules/appium/build/lib/selenium/note8.json
[Appium]   wdaLocalPort: 8230
[HTTP] Could not start REST http interface listener. The requested port may already be in use. Please make sure there is no other instance of this server running already.
Fatal Error: listen EADDRINUSE: address already in use 127.0.0.1:4800
    at Server.setupListenHandle [as _listen2] (net.js:1270:14)
    at listenInCluster (net.js:1318:12)
    at doListen (net.js:1451:7)
    at process._tickCallback (internal/process/next_tick.js:63:19)
[HTTP] --> GET /wd/hub/status
[HTTP] {}
[debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
[debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.12.1"}}
[HTTP] --> GET /wd/hub/status
[HTTP] {}
[debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
[HTTP] <-- GET /wd/hub/status 200 3 ms - 68
[HTTP] 
[debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.12.1"}}
[HTTP] <-- GET /wd/hub/status 200 3 ms - 68
[HTTP] 



example for one nodconfig file that loaded withing appium server

Enter code here...

{

  "capabilities":

      [

          {

      "deviceName": "SM_N9208",

      "browserName": "SM_N9208",

      "deviceId": "192.168.1.9:5556",

      "platform": "Android",

      "version": "7.0",

      "maxInstances": 1

              }

          ],

  "configuration":

  {

    "cleanUpCycle": 2000,

    "timeout": 30000,

    "browserTimeout": 180,

    "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",

    "url": "http://localhost:4956/wd/hub",

    "hubProtocol": "http",

    "maxSession": 1,

    "register": true,

    "registerCycle": 5000,

    "hubPort": 4444,

    "hubHost": "localhost"

  }

}




akamel...@gmail.com

unread,
May 4, 2019, 10:47:39 AM5/4/19
to Selenium Users
@Krishnan Mahadevan

⇜Krishnan Mahadevan⇝

unread,
May 6, 2019, 11:13:18 AM5/6/19
to Selenium Users

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/


On Sat, May 4, 2019 at 8:18 PM <akamel...@gmail.com> wrote:
@Krishnan Mahadevan

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/aba447a0-2dfe-4a3a-8e4a-159e0de95173%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages