qa-dev / jsonwire-grid

High-performance scalable implementation of Selenium Grid
MIT License
74 stars 10 forks source link

Connect with appium #23

Closed Bamieh closed 6 years ago

Bamieh commented 6 years ago

Hello, I love the approach of this project, I am currently using a wrapped selenium hub for my company to provide device automation.

Currently i add nodes to selenium hub using appium through nodeconfig param as such:

{
  "capabilities": [
    {
      "browserName": "iPhone 7 (iPhone9,3)",
      "appium-version": "1.7",
      "platform": "iOS",
      "version": "11.2",
      "deviceName": "iPhone (11.2.6)",
      "maxInstances": 1
    }
  ],
  "configuration": {
    "cleanUpCycle": 2000,
    "timeout": 30000,
    "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
    "port": 5555,
    "maxSession": 1,
    "role": "node",
    "hubPort": 4444,
    "hubHost": "127.0.0.1",
    "register": true,
    "registerCycle": 5000,
    "hub": "http://localhost:4444"
  }
}

However, when I switched to the jsonwire-grid I am getting this error from the grid console:

ERRO[0302] Can't find node by address[0.0.0.0:4723], storage: node not found
WARN[0302] api/proxy: Can't get node, Can't find node by address[0.0.0.0:4723], storage: node not found
WARN[0302] Can't unmarshal register json:  json: cannot unmarshal string into Go struct field Configuration.port of type int
INFO[0302] 500 POST /grid/register (127.0.0.1:60659) 0.000s

I am not sure where to start debugging since I have no clue how this grid has access to drivers or which version of selenium it is using (if it is using any).

Cheers!

andrskom commented 6 years ago

@Bamieh Do u use real device or simulator? We have got https://github.com/qa-dev/jsonwire-grid-wda-agent for run iOS simulator. @podtserkovskiy Can u try or comment compatibility with real device?

Bamieh commented 6 years ago

@andrskom Yes I am using read devices. I have fixed the issue above by changing the configs to the following:

{
  "capabilities": [
    {
      "browserName": "iPhone 7 (iPhone9,3)",
      "appium-version": "1.7",
      "platform": "iOS",
      "version": "11.2",
      "deviceName": "iPhone (11.2.6)",
      "maxInstances": 1
    }
  ],
  "configuration": {
    "cleanUpCycle": 2000,
    "timeout": 30000,
    "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
    "url": "http://127.0.0.1:2/wd/hub",
    "host": "127.0.0.1",
    "port": 2724,

    "maxSession": 1,
    "role": "node",

    "register": true,
    "registerCycle": 5000,
    "hubPort": 4444,
    "hubHost": "127.0.0.1"
  }
}

I removed "hub" and added "url" instead. Thanks a lot!