У меня есть проблемы с запуском тестов на Android 7.0 реальное устройство (Nexus 6) Appium версия: 1.6.3 ОС: Windows 10 Язык: Java Java-клиент: 4.1.2Невозможно запустить appium тесты на Android 7,0
Что интересно, когда я подключаю любое устройство Android 6 (установка platformVersion на 6.0) - тесты работают без проблем. Но когда я пытаюсь запустить их на устройстве Android 7.0, я получаю сообщение об ошибке.
Вот мои возможности для работы на Android 7.0:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("deviceName", "Android");
capabilities.setCapability("browserName", "Android");
capabilities.setCapability("platformName", "Android");
capabilities.setCapability("platformVersion", "7.0");
capabilities.setCapability("fullReset", true);
capabilities.setCapability("autoAcceptAlerts", true);
capabilities.setCapability("newCommandTimeout", 0);
capabilities.setCapability("app", "C:\Apk\xxx-release.apk");
capabilities.setCapability("appPackage", "com.xxx.android.vvm");
capabilities.setCapability("appActivity", "com.xxx.android.vvm.activity.Splash");
Вот журналы из консольного вывода IDE:
Feb 14, 2017 4:21:19 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end
Feb 14, 2017 4:21:24 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Falling back to original OSS JSON Wire Protocol.
Feb 14, 2017 4:21:29 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Falling back to straight W3C remote end connection
org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{app=C:\Apk\xxx-release.apk, appPackage=com.xxx.android.vvm, appActivity=com.xxx.android.vvm.activity.Splash, newCommandTimeout=0, platformVersion=7.0, browserName=Android, platformName=Android, deviceName=Android, fullReset=true, autoAcceptAlerts=true}], required capabilities = Capabilities [{}]
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'
System info: host: 'TAC-45', ip: '10.3.184.68', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_111'
Driver info: driver.version: AndroidDriver
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:91)
И здесь сервер журналы:
[debug] [AndroidDriver] Not cleaning generated files. Add clearSystemFiles capability if wanted.
[MJSONWP] Encountered internal error running command: Error: Error executing adbExec. Original error: 'Command 'C\:\Android\sdk\platform-tools\adb.exe -P 5037 -s ZX1G22D7HJ install C\:\Users\user\AppData\Roaming\npm\node_modules\appium\node_modules\io.appium.settings\bin\settings_apk-debug.apk' exited with code 1'; Stderr: 'Failed to install C:\Users\user\AppData\Roaming\npm\node_modules\appium\node_modules\io.appium.settings\bin\settings_apk-debug.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package io.appium.settings signatures do not match the previously installed version; ignoring!]'; Code: '1'
at ADB.execFunc$ (../../../lib/tools/system-calls.js:195:13)
at tryCatch (C:\Users\user\AppData\Roaming\npm\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as throw
at GeneratorFunctionPrototype.invoke (C:\Users\user\AppData\Roaming\npm\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
at process.tickCallback (internal/process/nexttick.js:103:7)
[HTTP] <-- POST /wd/hub/session 500 4879 ms - 754
[HTTP] --> POST /wd/hub/session {"capabilities":{"desiredCapabilities":{"app":"C:\Apk\xxx-release.apk","appPackage":"com.xxx.android.vvm","appActivity":"com.xxx.android.vvm.activity.Splash","newCommandTimeout":0,"platformVersion":"7.0","browserName":"Android","platformName":"Android","deviceName":"Android","fullReset":true,"autoAcceptAlerts":true},"requiredCapabilities":{}}}
[debug] [MJSONWP] Bad parameters: BadParametersError: Parameters were incorrect. We wanted {"required":["desiredCapabilities"],"optional":["requiredCapabilities","capabilities","sessionId","id","sessionId","id","sessionId","id"]} and you sent ["capabilities"]
Похоже, что есть ошибки с возможностями. Однако, когда я подключаю телефон с Android 6 и устанавливаю platformVersion на 6.0, все тесты работают без проблем!
Буду признателен за любую помощь.
Он сработал! Спасибо! – APC551
Это заслуживает больше «стрелок вверх». Помог мне точно – Dmitry