0

Setting up android as a node on Selenium GRID remains the last part by adding the .json configuration file to the selendroid .bat file left me confused. I ave tried it in several ways but still remain dump not responding as expected. These are the .bat files: Selendorid:

java -jar selendroid-standalone-0.13.0-with-dependencies.jar -app selendroid-test-app-0.14.0.apk -port 5555

Selenium GRID server:

java -Dfile.encoding=UTF-8 -cp "selendroid-grid-plugin-0.14.0.jar;selenium-server-standalone-2.44.0.jar" org.openqa.grid.selenium.GridLauncher -capabilityMatcher io.selendroid.grid.SelendroidCapabilityMatcher -role hub -host 127.0.0.1 -port 4444

The nodeconfig.json file:

{
  "capabilities": [{
      "browserName": "selendroid",
      "maxInstances": 1,
      "aut": "io.selendroid.testapp:0.14.0"
  }, {
      "browserName": "android",
      "maxInstances": 1
  }],
  "configuration": {
      "maxSession": 1,
      "register": true,
      "hubHost": "localhost",
      "hubPort": 4444,
      "remoteHost": "http://localhost:5555",
      "proxy": "io.selendroid.grid.SelendroidSessionProxy"
  }
}

how do I add the nodeconfig.json to the selendroid to make it work? I have tried thus:

java -jar selendroid-standalone-0.13.0-with-dependencies.jar -app selendroid-test-app-0.14.0.apk -port 5555 -role node nodeconfig: nodeconfig.json

which did not work. How od I get it working?

ken4ward
  • 1,828
  • 3
  • 36
  • 66

2 Answers2

1

Use cUrl to register the Selendroid Node to the WebDriver grid HUB.

I use a bat file with this contents (on Windows):

REM - Register a Selendroid WebDriver node to the Hub using CURL
"C:\opt\grid\curl-7.40.0\curl.exe" -H "Content-Type: application/json" -X POST --data @selendroid-node-config.json http://{IP-of-your-Grid-Hub}:4444/grid/register

In the Nodeconfig.json specify the selendroid capabilities.

If you are on a Windows machine you can download and use cUrl via this StackOverflow question: How do I install/set up and use cURL on Windows?

Community
  • 1
  • 1
Cagy79
  • 1,538
  • 1
  • 17
  • 24
1

You have used: java -jar selendroid-standalone-0.13.0-with-dependencies.jar -app selendroid-test-app-0.14.0.apk -port 5555 -role node nodeconfig: nodeconfig.json

Try to change the ":" to: "--" (after nodeconfig).

Eyal Sooliman
  • 1,283
  • 14
  • 25