Appium android7.0 的手机使用 UItomator2 时报错,具体的报错信息如下,求大神知道

daxuefei · 2018年08月15日 · 最后由 daxuefei 回复于 2018年08月15日 · 2026 次阅读

[Appium] Could not parse W3C capabilities: 'deviceName' can't be blank. Falling back to JSONWP protocol.
[Appium] The following capabilities were provided in the JSONWP desired capabilities that are missing in W3C capabilities: ["appActivity","resetKeyboard","newCommandTimeout","platformVersion","deviceName","platformName","appPackage","automationName","unicodeKeyboard","noReset"]. Falling back to JSONWP protocol.
[Appium] Creating new AndroidUiautomator2Driver (v1.12.0) session
[Appium] Capabilities:
[Appium] appActivity: com.xiniunet.xntalk.common.activity.splash.SplashActivity
[Appium] resetKeyboard: true
[Appium] newCommandTimeout: 6000
[Appium] platformVersion: 7.0
[Appium] deviceName: test
[Appium] platformName: Android
[Appium] appPackage: com.xiniunet.xntalk
[Appium] automationName: uiautomator2
[Appium] unicodeKeyboard: true
[Appium] noReset: true
[BaseDriver] Creating session with MJSONWP desired capabilities: {"appActivity":"com.xiniune...
[BaseDriver] Session created with session id: 7f99be91-9613-4e43-b86b-224e64745f04
[AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_77
[AndroidDriver] Retrieving device list
[ADB] Trying to find a connected android device
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[AndroidDriver] Looking for a device with Android '7.0'
[ADB] Setting device id to a6d2c493
[ADB] Getting device platform version
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell getprop ro.build.version.release'
[ADB] Current device property 'ro.build.version.release': 7.0
[AndroidDriver] Using device: a6d2c493
[ADB] Setting device id to a6d2c493
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell getprop ro.build.version.sdk'
[ADB] Current device property 'ro.build.version.sdk': 24
[ADB] Device API level: 24
[AndroidDriver] No app sent in, not parsing package/activity
[ADB] Getting device platform version
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell getprop ro.build.version.release'
[ADB] Current device property 'ro.build.version.release': 7.0
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell wm size'
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell wm density'
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell getprop ro.product.model'
[ADB] Current device property 'ro.product.model': SM-G5700
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell getprop ro.product.manufacturer'
[ADB] Current device property 'ro.product.manufacturer': samsung
[ADB] Device API level: 24
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell am force-stop io.appium.uiautomator2.server'
[ADB] Checking app cert for C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v1.12.0.apk
[ADB] Starting 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\build-tools\28.0.1\apksigner.bat' with args 'verify,--print-certs,C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v1.12.0.apk'
[ADB] 'C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v1.12.0.apk' is already signed.
[ADB] Checking app cert for C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
[ADB] Starting 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\build-tools\28.0.1\apksigner.bat' with args 'verify,--print-certs,C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk'
[ADB] 'C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk' is already signed.
[ADB] Getting install status for io.appium.uiautomator2.server
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell pm list packages io.appium.uiautomator2.server'
[ADB] App is installed
[ADB] Getting package info for 'io.appium.uiautomator2.server'
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell dumpsys package io.appium.uiautomator2.server'
[ADB] The installed 'io.appium.uiautomator2.server' package does not require upgrade ('1.12.0' >= '1.12.0')
[ADB] Getting install status for io.appium.uiautomator2.server.test
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell pm list packages io.appium.uiautomator2.server.test'
[ADB] App is installed
[ADB] Getting package info for 'io.appium.uiautomator2.server.test'
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell dumpsys package io.appium.uiautomator2.server.test'
[ADB] Cannot read version codes of 'C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk' and/or 'io.appium.uiautomator2.server.test'
[ADB] Cannot read version names of 'C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk' and/or 'io.appium.uiautomator2.server.test'. Assuming correct app version is already installed
[UiAutomator2] Waiting up to 20000ms for instrumentation 'io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner' to be available
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell pm list instrumentation'
[UiAutomator2] Instrumentation 'io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner' available
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 wait-for-device'
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell echo ping'
[AndroidDriver] Pushing settings apk to device...
[ADB] Getting install status for io.appium.settings
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell pm list packages io.appium.settings'
[ADB] App is installed
[ADB] Getting package info for 'io.appium.settings'
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell dumpsys package io.appium.settings'
[ADB] The installed 'io.appium.settings' package does not require upgrade ('2.3.0' >= '2.3.0')
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell ps'
[ADB] Device API level: 24
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell am start -W -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000'
[ADB] Device API level: 24
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell appops set io.appium.settings android:mock_location allow'
[AndroidDriver] setDeviceLanguageCountry requires language or country.
[AndroidDriver] Got language: 'undefined' and country: 'undefined'
[Logcat] Starting logcat capture
[AndroidDriver] Enabling Unicode keyboard support
[AndroidDriver] Pushing unicode ime to device...
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 install C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-android-ime\bin\UnicodeIME-debug.apk'
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 install C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-android-ime\bin\UnicodeIME-debug.apk'
[ADB] Application 'C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-android-ime\bin\UnicodeIME-debug.apk' already installed. Continuing.
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell settings get secure default_input_method'
[AndroidDriver] Unsetting previous IME com.sohu.inputmethod.sogou/.SogouIME
[AndroidDriver] Setting IME to 'io.appium.android.ime/.UnicodeIME'
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell ime enable io.appium.android.ime/.UnicodeIME'
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell ime set io.appium.android.ime/.UnicodeIME'
[AndroidDriver] Pushing unlock helper app to device...
[ADB] Getting install status for io.appium.unlock
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell pm list packages io.appium.unlock'
[ADB] App is installed
[ADB] Getting package info for 'io.appium.unlock'
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell dumpsys package io.appium.unlock'
[ADB] The installed 'io.appium.unlock' package does not require upgrade ('2.0.0' >= '2.0.0')
[UiAutomator2] Forwarding UiAutomator2 Server port 6790 to 8200
[ADB] Forwarding system: 8200 to device: 6790
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 forward tcp:8200 tcp:6790'
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell rm -rf /data/local/tmp/strings.json'
[UiAutomator2] No app capability. Assuming it is already on the device
[ADB] Checking app cert for undefined
[ADB] 'undefined' doesn't exist
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell am force-stop io.appium.uiautomator2.server'
[UiAutomator2] Starting uiautomator2 server 1.12.0
[UiAutomator2] Using UIAutomator2 server from 'C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v1.12.0.apk' and test from 'C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk'
[UiAutomator2] Running command: 'adb -s a6d2c493 shell am instrument -w io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner'
[UiAutomator2] Waiting up to 20000ms for UiAutomator2 to be online...
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"SESSIONID\",\"status\":0,\"value\":\"Status Invoked\"}"
[JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8200/wd/hub/session] with body: {"desiredCapabilities":{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"appActivity":"com.xiniunet.xntalk.common.activity.splash.SplashActivity","resetKeyboard":true,"newCommandTimeout":6000,"platformVersion":"7.0","deviceName":"test","platformName":"Android","appPackage":"com.xiniunet.xntalk","automationName":"uiautomator2","unicodeKeyboard":true,"noReset":true},"appActivity":"com.xiniunet.xntalk.common.activity.splash.SplashActivity","resetKeyboard":true,"newCommandTimeout":6000,"platformVersion":"7.0","deviceName":"a6d2c493","platformName":"Android","appPackage":"com.xiniunet.xntalk","automationName":"uiautomator2","unicodeKeyboard":true,"noReset":true,"deviceUDID":"a6d2c493","deviceScreenSize":"720x1280","deviceScreenDensity":320,"deviceModel":"SM-G5700","deviceManufacturer":"samsung","deviceApiLevel":24}}
[JSONWP Proxy] Got response with status 200: {"sessionId":"3f7a6d52-5461-4e2a-91cb-f238deba3e04","status":0,"value":"Created Session"}
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell dumpsys window'
[AndroidDriver] Screen already unlocked, doing nothing
[UiAutomator2] UiAutomator2 did not start the activity we were waiting for, 'com.xiniunet.xntalk/com.xiniunet.xntalk.common.activity.splash.SplashActivity'. Starting it ourselves
[ADB] Device API level: 24
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell am start -W -n com.xiniunet.xntalk/com.xiniunet.xntalk.common.activity.splash.SplashActivity -S'
[JSONWP Proxy] Proxying [GET /appium/device/pixel_ratio] to [GET http://localhost:8200/wd/hub/session/3f7a6d52-5461-4e2a-91cb-f238deba3e04/appium/device/pixel_ratio] with body: {}
[JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"3f7a6d52-5461-4e2a-91cb-f238deba3e04\",\"status\":0,\"value\":2}"
[JSONWP Proxy] Proxying [GET /appium/device/system_bars] to [GET http://localhost:8200/wd/hub/session/3f7a6d52-5461-4e2a-91cb-f238deba3e04/appium/device/system_bars] with body: {}
[JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"3f7a6d52-5461-4e2a-91cb-f238deba3e04\",\"status\":0,\"value\":{\"statusBar\":48}}"
[JSONWP Proxy] Proxying [GET /window/current/size] to [GET http://localhost:8200/wd/hub/session/3f7a6d52-5461-4e2a-91cb-f238deba3e04/window/current/size] with body: {}
[JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"3f7a6d52-5461-4e2a-91cb-f238deba3e04\",\"status\":0,\"value\":{\"height\":1280,\"width\":720}}"
[Appium] New AndroidUiautomator2Driver session created successfully, session 7f99be91-9613-4e43-b86b-224e64745f04 added to master session list
[BaseDriver] Event 'newSessionStarted' logged at 1534304237389 (11:37:17 GMT+0800 (中国标准时间))
[MJSONWP] Responding to client with driver.createSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"appActivity":"com.xiniunet.xntalk.common.activity.splash.SplashActivity","resetKeyboard":true,"newCommandTimeout":6000,"platformVersion":"7.0","deviceName":"test","platformName":"Android","appPackage":"com.xiniunet.xntalk","automationName":"uiautomator2","unicodeKeyboard":true,"noReset":true},"appActivity":"com.xiniunet.xntalk.common.activity.splash.SplashActivity","resetKeyboard":true,"newCommandTimeout":6000,"platformVersion":"7.0","deviceName":"a6d2c493","platformName":"Android","appPackage":"com.xiniunet.xntalk","automationName":"uiautomator2","unicodeKeyboard":true,"noReset":true,"deviceUDID":"a6d2c493","deviceScreenSize":"720x1280","deviceScreenDensity":320,"deviceModel":"SM-G5700","deviceManufacturer":"samsung","deviceApiLevel":24,"pixelRatio":2,"statBarHeight":48,"viewportRect":{"left":0,"top":4...
[HTTP] <-- POST /wd/hub/session 200 41999 ms - 1122
[HTTP]
[HTTP] --> POST /wd/hub/session/7f99be91-9613-4e43-b86b-224e64745f04/timeouts/implicit_wait
[HTTP] {"ms":50000,"sessionId":"7f99be91-9613-4e43-b86b-224e64745f04"}
[W3C] Calling AppiumDriver.implicitWait() with args: [50000,"7f99be91-9613-4e43-b86b-224e64745f04"]
[BaseDriver] Set implicit wait to 50000ms
[MJSONWP] Responding to client with driver.implicitWait() result: null
[HTTP] <-- POST /wd/hub/session/7f99be91-9613-4e43-b86b-224e64745f04/timeouts/implicit_wait 200 5 ms - 76
[HTTP]
[HTTP] --> POST /wd/hub/session/7f99be91-9613-4e43-b86b-224e64745f04/timeouts/implicit_wait
[HTTP] {"ms":10000,"sessionId":"7f99be91-9613-4e43-b86b-224e64745f04"}
[W3C] Calling AppiumDriver.implicitWait() with args: [10000,"7f99be91-9613-4e43-b86b-224e64745f04"]
[BaseDriver] Set implicit wait to 10000ms
[MJSONWP] Responding to client with driver.implicitWait() result: null
[HTTP] <-- POST /wd/hub/session/7f99be91-9613-4e43-b86b-224e64745f04/timeouts/implicit_wait 200 3 ms - 76
[HTTP]
[HTTP] --> POST /wd/hub/session/7f99be91-9613-4e43-b86b-224e64745f04/element
[HTTP] {"using":"id","value":"com.xiniunet.xntalk:id/et_account","sessionId":"7f99be91-9613-4e43-b86b-224e64745f04"}
[W3C] Calling AppiumDriver.findElement() with args: ["id","com.xiniunet.xntalk:id/et_account","7f99be91-9613-4e43-b86b-224e64745f04"]
[BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[BaseDriver] Waiting up to 10000 ms for condition
[JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8200/wd/hub/session/3f7a6d52-5461-4e2a-91cb-f238deba3e04/element] with body: {"strategy":"id","selector":"com.xiniunet.xntalk:id/et_account","context":"","multiple":false}
[MJSONWP] Encountered internal error running command: {"w3cStatus":400,"jsonwp":{"sessionId":"3f7a6d52-5461-4e2a-91cb-f238deba3e04","status":7,"value":"An element could not be located on the page using the given search parameters."}} ProxyRequestError: Could not proxy command to remote server. Original error: 500 - {"sessionId":"3f7a6d52-5461-4e2a-91cb-f238deba3e04","status":7,"value":"An element could not be located on the page using the given search parameters."}
[MJSONWP] at JWProxy.proxy$ (C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\jsonwp-proxy\proxy.js:152:13)
[MJSONWP] at tryCatch (C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
[MJSONWP] at GeneratorFunctionPrototype.invoke as _invoke
[MJSONWP] at GeneratorFunctionPrototype.prototype.(anonymous function) as throw
[MJSONWP] at GeneratorFunctionPrototype.invoke (C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
[MJSONWP] at
[MJSONWP] Matched JSONWP error code 7 to NoSuchElementError
[HTTP] <-- POST /wd/hub/session/7f99be91-9613-4e43-b86b-224e64745f04/element 500 324 ms - 164
[HTTP]
[HTTP] --> DELETE /wd/hub/session/7f99be91-9613-4e43-b86b-224e64745f04
[HTTP] {}
[W3C] Calling AppiumDriver.deleteSession() with args: ["7f99be91-9613-4e43-b86b-224e64745f04"]
[BaseDriver] Event 'quitSessionRequested' logged at 1534304237742 (11:37:17 GMT+0800 (中国标准时间))
[Appium] Removing session 7f99be91-9613-4e43-b86b-224e64745f04 from our master session list
[UiAutomator2] Deleting UiAutomator2 session
[UiAutomator2] Deleting UiAutomator2 server session
[JSONWP Proxy] Proxying [DELETE /] to [DELETE http://localhost:8200/wd/hub/session/3f7a6d52-5461-4e2a-91cb-f238deba3e04] with no body
[JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"3f7a6d52-5461-4e2a-91cb-f238deba3e04\",\"status\":0,\"value\":\"Session deleted\"}"
[UiAutomator2] Resetting IME to 'com.sohu.inputmethod.sogou/.SogouIME'
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell ime set com.sohu.inputmethod.sogou/.SogouIME'
[UiAutomator2] [UIAutomator2] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:.
[UiAutomator2] [UIAutomator2] Time: 6.04
[UiAutomator2] [UIAutomator2] OK (1 test)
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 shell am force-stop com.xiniunet.xntalk'
[Logcat] Stopping logcat capture
[ADB] Removing forwarded port socket connection: 8200
[ADB] Running 'D:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -P 5037 -s a6d2c493 forward --remove tcp:8200'
[BaseDriver] Event 'quitSessionFinished' logged at 1534304241709 (11:37:21 GMT+0800 (中国标准时间))
[MJSONWP] Received response: null
[MJSONWP] But deleting session, so not returning
[MJSONWP] Responding to client with driver.deleteSession() result: null
[HTTP] <-- DELETE /wd/hub/session/7f99be91-9613-4e43-b86b-224e64745f04 200 3967 ms - 76
[HTTP]

共收到 1 条回复 时间 点赞

相关信息:appiun-desktop:1.6.2,android:7.0
python 的配置信息:
desired_caps = {}
desired_caps['platformName'] = 'Android'
# desired_caps['platformVersion'] = '4.4.2'
# desired_caps['platformVersion'] = '6.0.1'
desired_caps['platformVersion'] = '7.0'
desired_caps['deviceName'] = 'test' # 连接多个设备才有用
# desired_caps['app'] = r'e:\apk\toutiao.apk'# 如果已经安装好软件乐意不需要,这边填写的是 apk 在电脑上的路径
desired_caps['appPackage'] = 'com.' # app 的包名,唯一标志 app
desired_caps['appActivity'] = 'com.y' # 对应安卓应用的操作界面
desired_caps['unicodeKeyboard'] = True # 安装一个中文的输入法
desired_caps['resetKeyboard'] = True #
desired_caps['noReset'] = True # 清除元素数据,跳过初始页面
desired_caps['newCommandTimeout'] = 6000
desired_caps['automationName'] = 'uiautomator2'

只要去掉'automationName'就能运行成功

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册