How To Make Sure The Appium Node Is Connected To Only One Phone?
Solution 1:
I was surprised that the capabilities I tries before did not work since in other forum posts it seemed to have worked for others (although usually not clear if they use a selenium-grid).
My solution so far is to use the following appium server (grid node) config (both udid and version need to be included)
{"capabilities":[{"platform":"ANDROID","platformName":"Android","platformVersion":"7.1.1","browserName":"chrome","version":"6","deviceName":"Nexus6","udid":"192.1.1.63:5555","maxInstances":1}],"configuration":{"cleanUpCycle":2500,"timeout":30000,"maxSession":1,"register":true,"registerCycle":1000,"hubPort":4444,"hubHost":"localhost"}}
And for starting the session the same applies (include udid and version)
Watir::Browser.new :chrome, {
url: "http://localhost:4444/wd/hub",
platformName: "Android",
platformVersion: "7.1.1",
browserName: "chrome",
version: "6",
deviceName: "Nexus6",
udid: "192.1.1.63:5555"
}
It would still be good to know why the above solutions I tried did not work. From all things I did read I assume this is the reason. The grid only looks at platformName, platformVersion, browserName, version(browserVersion) and deviceName (although this last one is being ignored). Based on that it will forward all capabilities to a matching appium node. Then udid is recognized as a capability by the appium node and used to make a connection to the phone I want. If I leave out the udid, it will connect to a phone that is matching the other capabilities and ignores the udid I set in the initial config. That last is what I don't understand why this is the case, but for me this setup (with udid) works.
Post a Comment for "How To Make Sure The Appium Node Is Connected To Only One Phone?"