Как решить "/ wd / hub / session java.io.IOException: org.openqa.grid.common.exception.GridException: Невозможно извлечь возможности из запроса:" - PullRequest
0 голосов
/ 08 июля 2019

Я пытаюсь настроить Appium Grid для параллельного выполнения.

Версия Appium (или git revision), в которой обнаружена проблема: 1.13.1 Настольная ОС / версия, используемая для запуска Appium: Windows 10 Node.jsверсия (если не используется Appium.app | exe): Nodejs Npm или менеджер пакетов Yarn: запуск appium через bat-файл Тестируемая мобильная версия / версия: Android 7.0 и 7.1.1 Реальное устройство или эмулятор / симулятор: Appium CLI или Appium.app| exe: appium -p 4725 --udid ZW3226GGPK -bp 5556 --chromedriver-port 5645 --nodeconfig "D: \ Workspace \ fsp-app-Automation \ all.json" -g "D: \ Workspace \ fsp-app-automation \ appium_1.log "--session-override

Желаемые возможности:

System.out.println(portNo+"---"+System.currentTimeMillis());
System.out.println(device_id + "---" + System.currentTimeMillis());
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, secondDeviceName);
capabilities.setCapability("udid", secondDeviceName);
capabilities.setCapability("platformVersion", "7.1.1");
capabilities.setCapability(MobileCapabilityType.APP, app.getAbsolutePath());
//  capabilities.setCapability(MobileCapabilityType.APP, app.getAbsolutePath());
if (AppUtil.prop.containsKey("wait.activity")) {
capabilities.setCapability("appWaitActivity", AppUtil.WAIT_ACTIVITY);
} else {
capabilities.setCapability("appActivity", AppUtil.APP_ACTIVITY);
}
        capabilities.setCapability("package", AppUtil.BASE_PKG);
all.json

{
"capabilities":
[
{
"browserName": "Chrome",
"deviceName": "Appium",
"version":"7.0",
"maxInstances": 1,
"platformName":"ANDROID"
},
{
"browserName": "Chrome",
"deviceName": "Appium",
"version":"7.1.1",
"maxInstances": 1,
"platformName":"ANDROID"
}
],
"configuration":
{
"cleanUpCycle": 5000,
"registerCycle": 5000,
"nodeTimeout": 120,
"timeout": 600000,
"nodePolling": 2000,
"hub": "http://localhost:4444/grid/register",
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"maxSession": 10,
"port": 5555,
"host": "localhost",
"register": true,
"hubPort": 4444,
"hubHost" :"localhost",
"role": "node"
}  
}

Журналы сервера

D:\Workspace\fsp-app-automation>java -jar selenium-server-standalone-3.13.0.jar -role hub
11:53:11.800 INFO [GridLauncherV3.launch] - Selenium build info: version: '3.13.0', revision: '2f0d292'
11:53:11.803 INFO [GridLauncherV3$2.launch] - Launching Selenium Grid hub on port 4444
2019-07-08 11:53:12.240:INFO::main: Logging initialized @975ms to org.seleniumhq.jetty9.util.log.StdErrLog
11:53:12.906 INFO [Hub.start] - Selenium Grid hub is up and running
11:53:12.907 INFO [Hub.start] - Nodes should register to http://10.190.50.136:4444/grid/register/
11:53:12.908 INFO [Hub.start] - Clients should connect to http://10.190.50.136:4444/wd/hub
11:53:28.134 INFO [DefaultGridRegistry.add] - Registered a node http://0.0.0.0:4726
11:53:32.296 INFO [DefaultGridRegistry.add] - Registered a node http://0.0.0.0:4725
2019-07-08 11:53:48.888:WARN:osjs.HttpChannel:qtp143110009-16: /wd/hub/session java.io.IOException: org.openqa.grid.common.exception.GridException: Cannot extract a capabilities from the request: {
"desiredCapabilities": {
"app": "D:\Workspace\fsp-app-automation\src\test\resources\com.globalagricentral.apk",
"package": "com.globalagricentral",
"platformVersion": "7.0",
"appWaitActivity": "*.LanguageActivity, .SplashActivity",
"platformName": "Android",
"udid": "ZW3226GGPK",
"deviceName": "ZW3226GGPK"
},
"capabilities": {
"firstMatch": [
{
"appium:app": "D:\Workspace\fsp-app-automation\src\test\resources\com.globalagricentral.apk",
"appium:appWaitActivity": ".LanguageActivity, .SplashActivity",
"appium:deviceName": "ZW3226GGPK",
"package": "com.globalagricentral",
"platformName": "android",
"appium:platformVersion": "7.0",
"appium:udid": "ZW3226GGPK"
}
]
}
}
2019-07-08 11:53:48.888:WARN:osjs.HttpChannel:qtp143110009-15: /wd/hub/session java.io.IOException: org.openqa.grid.common.exception.GridException: Cannot extract a capabilities from the request: {
"desiredCapabilities": {
"app": "D:\Workspace\fsp-app-automation\src\test\resources\com.globalagricentral.apk",
"package": "com.globalagricentral",
"platformVersion": "7.1.1",
"appWaitActivity": ".LanguageActivity, .SplashActivity",
"platformName": "Android",
"udid": "emulator-5554",
"deviceName": "emulator-5554"
},
"capabilities": {
"firstMatch": [
{
"appium:app": "D:\Workspace\fsp-app-automation\src\test\resources\com.globalagricentral.apk",
"appium:appWaitActivity": ".LanguageActivity, *.SplashActivity",
"appium:deviceName": "emulator-5554",
"package": "com.globalagricentral",
"platformName": "android",
"appium:platformVersion": "7.1.1",
"appium:udid": "emulator-5554"
}
]
}
}
...