Есть отличная удаленная работа для php+codeception+jenkins+allure+docker спецов. 100% remote! Присоединиться к проекту

Проблема с установкой и запуском Appium'a.


(MevMIx) #1

Добрый день. Рещил попробовать автоматизацию тестиирования на Appium, но столкнулся с проблемой.
Может кто подскажет. Фактически проблема заключается в том, что не могу запустить Appium.
Android. Пробовал реальное устройство и вируталку

  1. nodejs установлена v.0.12
  2. Установлен Appium, установочник, скачивал с главнной страницы Appium.io
  3. Android SDK установлен - в path все прописано
  4. Java установлена
  5. Эмуляторы пробовал два AVD и Genymotion
    Запуская Appium, в настройках указывал и путь к приложению.
    Запускаю сервер. Далее жму инспектор, но приложение не стратует, при нажатии Обновить ошибки.
    Перерыл весь интернет, везеде пишут практически такие шаги
    Ось Win.8.1
    На iOS пока не могу побровать, нет под рукой.
    Спасибо!!!

(Aleksey Ilyenko) #2

Выложите лог с ошибками


(Сергей Комаров) #3

что говорит appium doctor?


(Андрей Бугай) #4

Если под инспектором имеется ввиду иконка линзы возле возле кнопки “старт” в аппиум сервере, то она на винде не работает. Вместо нее советуют юзать uiautomatorvier из андроид СДК


(MevMIx) #5

лог ошибки

Launching Appium server with command: C:\Program Files (x86)\Appium\node.exe lib\server\main.js --address 127.0.0.1 --port 4273 --app C:\Download\viber-6-1-5-93.apk --avd Google_Nexus_4_api19 --device-ready-timeout 5 --platform-name Android --platform-version 19 --automation-name Appium --log-no-color
info: Welcome to Appium v1.4.16 (REV ae6877eff263066b26328d457bd285c0cc62430d)
info: Appium REST http interface listener started on 127.0.0.1:4273
info: [debug] Non-default server args: {“app”:“C:\Download\viber-6-1-5-93.apk”,“address”:“127.0.0.1”,“port”:4273,“logNoColors”:true,“avd”:“Google_Nexus_4_api19”,“platformName”:“Android”,“platformVersion”:“19”,“automationName”:“Appium”}
info: Console LogLevel: debug
info: --> POST /wd/hub/session {“desiredCapabilities”:{“app”:“C:\Download\viber-6-1-5-93.apk”,“deviceReadyTimeout”:“5”,“platformName”:“Android”}}
info: Client User-Agent string: undefined
error: The following desired capabilities are required, but were not provided: deviceName
info: [debug] Got configuration error, not starting session
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: The following desired capabilities are required, but were not provided: deviceName
info: [debug] Error: The following desired capabilities are required, but were not provided: deviceName
at [object Object].Capabilities.checkValidity (C:\Program Files (x86)\Appium\node_modules\appium\lib\server\capabilities.js:146:13)
at [object Object].Appium.configure (C:\Program Files (x86)\Appium\node_modules\appium\lib\appium.js:238:35)
at [object Object]. (C:\Program Files (x86)\Appium\node_modules\appium\lib\appium.js:118:10)
at [object Object].Appium.start (C:\Program Files (x86)\Appium\node_modules\appium\lib\appium.js:129:5)
at exports.createSession (C:\Program Files (x86)\Appium\node_modules\appium\lib\server\controller.js:188:16)
at Layer.handle [as handle_request] (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\layer.js:82:5)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:110:13)
at Route.dispatch (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:91:3)
at Layer.handle [as handle_request] (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\layer.js:82:5)
at C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:267:22
at Function.proto.process_params (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:321:12)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:261:10)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:100:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at C:\Program Files (x86)\Appium\node_modules\appium\lib\server\controller.js:39:7
at Layer.handle [as handle_request] (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\layer.js:82:5)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:110:13)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at Route.dispatch (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:91:3)
at Layer.handle [as handle_request] (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\layer.js:82:5)
at C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:267:22
at Function.proto.process_params (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:321:12)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:261:10)
at methodOverride (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\method-override\index.js:79:5)
at Layer.handle [as handle_request] (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\layer.js:82:5)
at trim_prefix (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:302:13)
at C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:270:7
at Function.proto.process_params (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:321:12)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:261:10)
at logger (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\morgan\index.js:136:5)
at Layer.handle [as handle_request] (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\layer.js:82:5)
at trim_prefix (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:302:13)
at C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:270:7
at Function.proto.process_params (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:321:12)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:261:10)
at C:\Program Files (x86)\Appium\node_modules\appium\node_modules\body-parser\lib\read.js:111:5
at done (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\body-parser\node_modules\raw-body\index.js:248:14)
at IncomingMessage.onEnd (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\body-parser\node_modules\raw-body\index.js:294:7)
at IncomingMessage.g (events.js:199:16)
at IncomingMessage.emit (events.js:104:17)
at _stream_readable.js:908:16
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: The following desired capabilities are required, but were not provided: deviceName)”,“origValue”:“The following desired capabilities are required, but were not provided: deviceName”},“sessionId”:null}
info: <-- POST /wd/hub/session 500 18.505 ms - 286


(Андрей Бугай) #6

ругается, что хочет в капабилитис параметр ДевайсНейм, можно указать любой


(MevMIx) #7

Спасибо. Запустил без проблем


(MevMIx) #8

Launching Appium server with command: C:\Program Files (x86)\Appium\node.exe lib\server\main.js --address 127.0.0.1 --port 4273 --app C:\Download\viber-6-1-5-93.apk --avd Mint Xfce --device-ready-timeout 5 --platform-name Android --platform-version 19 --automation-name Appium --device-name “test” --log-no-color
usage: main.js [-h] [-v] [–shell]
[–localizable-strings-dir LOCALIZABLESTRINGSDIR] [–app APP]
[–ipa IPA] [-U UDID] [-a ADDRESS] [-p PORT]
[-ca CALLBACKADDRESS] [-cp CALLBACKPORT] [-bp BOOTSTRAPPORT]
[-k] [-r BACKENDRETRIES] [–session-override] [–full-reset]
[–no-reset] [-l] [-lt LAUNCHTIMEOUT] [-g LOG]
[–log-level {info,info:debug,info:info,info:warn,info:error,warn,warn:debug,warn:info,warn:warn,warn:error,error,error:debug,error:info,error:warn,error:error,debug,debug:debug,debug:info,debug:warn,debug:error}]
[–log-timestamp] [–local-timezone] [–log-no-colors]
[-G WEBHOOK] [–native-instruments-lib]
[–app-pkg ANDROIDPACKAGE] [–app-activity ANDROIDACTIVITY]
[–app-wait-package ANDROIDWAITPACKAGE]
[–app-wait-activity ANDROIDWAITACTIVITY]
[–android-coverage ANDROIDCOVERAGE] [–avd AVD]
[–avd-args AVDARGS]
[–device-ready-timeout ANDROIDDEVICEREADYTIMEOUT] [–safari]
[–device-name DEVICENAME] [–platform-name PLATFORMNAME]
[–platform-version PLATFORMVERSION]
[–automation-name AUTOMATIONNAME] [–browser-name BROWSERNAME]
[–default-device] [–force-iphone] [–force-ipad]
[–language LANGUAGE] [–locale LOCALE]
[–calendar-format CALENDARFORMAT] [–orientation ORIENTATION]
[–tracetemplate AUTOMATIONTRACETEMPLATEPATH]
[–instruments INSTRUMENTSPATH] [–show-sim-log]
[–show-ios-log] [–nodeconfig NODECONFIG] [-ra ROBOTADDRESS]
[-rp ROBOTPORT] [–selendroid-port SELENDROIDPORT]
[–chromedriver-port CHROMEDRIVERPORT]
[–chromedriver-executable CHROMEDRIVEREXECUTABLE]
[–use-keystore] [–keystore-path KEYSTOREPATH]
[–keystore-password KEYSTOREPASSWORD] [–key-alias KEYALIAS]
[–key-password KEYPASSWORD] [–show-config] [–no-perms-check]
[–command-timeout DEFAULTCOMMANDTIMEOUT] [–keep-keychains]
[–strict-caps] [–isolate-sim-device] [–tmp TMPDIR]
[–trace-dir TRACEDIR] [–intent-action INTENTACTION]
[–intent-category INTENTCATEGORY] [–intent-flags INTENTFLAGS]
[–intent-args OPTIONALINTENTARGUMENTS]
[–dont-stop-app-on-reset] [–debug-log-spacing]
[–suppress-adb-kill-server] [–async-trace]

main.js: error: Unrecognized arguments: Xfce.

Appium server process ended

сейчас выдает такую ошибку на старте сервера


(Сергей Комаров) #9

У вас пробел между “Mint” и “Xfce” в стороке “–avd Mint Xfce”


(MevMIx) #10

Странно, но там даже флаг не установлен


(MevMIx) #11

по логам доктора все нормуль