1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
| # 设备注册到hub cd '/c/Program Files/Appium/resources/app/node_modules/appium/build/lib' node main.js -a 127.0.0.1 -p 4723 -bp 4725 -U 8676-A01-0x3da2c286 --nodeconfig /d/bq/config/dason.json
#配置说明 { "capabilities": [ { "deviceName": "127.0.0.1:62001", #此为adb devices检测到的设备名 "version":"4.4.2", #模拟器/真机的系统版本 "maxInstances": 1, #最多的实例个数 "platform":"ANDROID", #测试平台:Android "browserName": "" #测试普通App可置为空,如果是测试浏览器如chrome就可以写上 } ], "configuration": { "cleanUpCycle":2000, "timeout":30000, "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy", "hub":"127.0.0.1:4444/grid/register", #hub的注册接口地址 "url":"http://127.0.0.1:4723/wd/hub", #Appium Server的默认访问路径 "host": "127.0.0.1", #Appium Server的IP地址 "port": 4723, #Appium Server端口号 "maxSession": 1, "register": true, "registerCycle": 5000, "hubPort": 4444, #hub端口号 "hubHost": "127.0.0.1", #hub IP地址,这里是在本机上启动的,如果是在另外的机器上需要用其外部的IP地址,比如:192.168.1.111这种 "hubProtocol": "http" #协议,默认为http } }
#配置参考 { "capabilities": [ { "deviceName": "8676-A01-0x3da2c286", "version": "5.1", "maxInstances": 1, "platform": "ANDROID", "browserName": "chrome" } ], "configuration": { "cleanUpCycle": 2000, "timeout": 30000, "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy", "hub": "http://192.168.0.108:4444/grid/register", "url": "http://127.0.0.1:4723/wd/hub", "host": "192.168.0.103", "port": 4723, "maxSession": 1, "register": true, "registerCycle": 5000, "hubPort": 4444, "hubHost": "192.168.0.108", "hubProtocol": "http" } }
|