java -jar selenium-server-standalone-3.0.1.jar -port 4444 -role hub
{
"capabilities": [
{
"deviceName": "DU2TAN15AJ049163",
"version": "4.4.2",
"maxInstances": 3,
"platform": "ANDROID",
"browserName": "chrome"
}
],
"configuration": {
"cleanUpCycle": 2000,
"timeout": 300000,
"browserTimeout": 60000,
"hub":"127.0.0.1:4444/grid/register",
"host":"192.168.1.218",
"maxSession": 6,
"port": 4723,
"hubPort": 4444,
"hubHost": "192.168.1.218",
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"url": "http://127.0.0.1:4723/wd/hub",
"register": true,
"registerCycle": 5000
}
}
node D:\\app\Appium\\node_modules\\appium\\bin\\appium.js -p 4723 -U DU2TAN15AJ049163 --nodeconfig D:\app\appium_study\testRunner\test.json
{
"capabilities": [
{
"deviceName": "MSM8926", #设备id
"version": "4.3",
"maxInstances": 3,
"platform": "ANDROID",
"browserName": "chrome"
}
],
"configuration": {
"cleanUpCycle": 2000,
"timeout": 300000,
"browserTimeout": 60000,
"hub":"127.0.0.1:4444/grid/register", #链接hub
"host":"192.168.1.218",
"maxSession": 6,
"port": 4724,#端口号
"hubPort": 4444,
"hubHost": "192.168.1.218",
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"url": "http://127.0.0.1:4724/wd/hub",# 4724 appium服务器
"register": true,
"registerCycle": 5000
}
}
node D:\\app\Appium\\node_modules\\appium\\bin\\appium.js -p 4724 -U MSM8926--nodeconfig D:\app\appium_study\testRunner\test2.json
在浏览器输入:http://192.168.1.218:4444/grid/console 就能看到你连接了多少个设备