client(我这里是appium-python-client)传desired_capabilities给appium server,根据传的内容,设置automationName(Setting 'automationName=UiAutomator2' by default and using the UiAutomator2 Driver),由此决定是用安卓自动化测试框架还是ios自动化测试框架。
然后appium server创建一个session,以session作为唯一标识与client进行通信。
appium server接收到client的请求后,通过端口将请求传给终端(IOS真机、安卓真机、ios模拟器、安卓模拟器)。
终端再返回执行结果给appium server,然后再执行下一条。
执行到最后退出webdriver(driver.quit()),删除session,执行完成。
2. 为什么appium相比较于monkeyrunner、uiautomator等,可以同时支持安卓与ios呢?
原因在于他的结构不同,client上传到server,再由server决定是使用哪个框架,而只要appium支持使用不同系统的框架就可实现测试不同的系统。
3. 怎么看appium是如何工作的呢?
在appium在执行过程中都会打印日志,查看日志就可看到相关信息。下面附上我在执行过程中打印的日志。可以从日志中看到,automationName设置,session创建等等。
[info] [35m[Appium] [39m Welcome to Appium v1.15.1
[info] [35m[Appium] [39m Non-default server args:
[info] [35m[Appium] [39m allowInsecure: {
[info] [35m[Appium] [39m }
[info] [35m[Appium] [39m denyInsecure: {
[info] [35m[Appium] [39m }
[info] [35m[Appium] [39m Appium REST http interface listener started on 0.0.0.0:4723[info] [35m[HTTP] [39m [37m--> [39m [37mPOST [39m [37m/wd/hub/session [39m
[info] [35m[HTTP] [39m [90m{"capabilities":{"firstMatch":[{"appium:deviceName":"HUAWEI P30","appium:automationName":"appium","platformName":"Android","appium:platformVersion":"10","appium:appPackage":"com.rfchina.app.supercommunity.Dev","appium:appActivity":"com.rfchina.app.supercommunity.SplashActivity","appium:noReset":true}]},"desiredCapabilities":{"deviceName":"HUAWEI P30","automationName":"appium","platformName":"Android","platformVersion":"10","appPackage":"com.rfchina.app.supercommunity.Dev","appActivity":"com.rfchina.app.supercommunity.SplashActivity","noReset":true}} [39m
[debug] [35m[W3C] [39m Calling AppiumDriver.createSession() with args: [{"deviceName":"HUAWEI P30","automationName":"appium","platformName":"Android","platformVersion":"10","appPackage":"com.rfchina.app.supercommunity.Dev","appActivity":"com.rfchina.app.supercommunity.SplashActivity","noReset":true},null,{"firstMatch":[{"appium:deviceName":"HUAWEI P30","appium:automationName":"appium","platformName":"Android","appium:platformVersion":"10","appium:appPackage":"com.rfchina.app.supercommunity.Dev","appium:appActivity":"com.rfchina.app.supercommunity.SplashActivity","appium:noReset":true}]}]
[debug] [35m[BaseDriver] [39m Event 'newSessionRequested' logged at 1589799227003 (18:53:47 GMT+0800 (中国标准时间))
[warn] [35m[Appium] [39m
[warn] [35m[Appium] [39m ======================================================================
[warn] [35m[Appium] [39m DEPRECATION WARNING:
[warn] [35m[Appium] [39m
[warn] [35m[Appium] [39m The 'automationName' capability was not provided in the desired
[warn] [35m[Appium] [39m capabilities for this Android session
[warn] [35m[Appium] [39m
[warn] [35m[Appium] [39m Setting 'automationName=UiAutomator2' by default and using the
[warn] [35m[Appium] [39m UiAutomator2 Driver
[warn] [35m[Appium] [39m
[warn] [35m[Appium] [39m The next major version of Appium (2.x) will **require** the
[warn] [35m[Appium] [39m 'automationName' capability to be set for all sessions on all
[warn] [35m[Appium] [39m platforms
[warn] [35m[Appium] [39m
[warn] [35m[Appium] [39m In previous versions (Appium <= 1.13.x), the default was
[warn] [35m[Appium] [39m 'automationName=UiAutomator1'
[warn] [35m[Appium] [39m
[warn] [35m[Appium] [39m If you wish to use that automation instead of UiAutomator2, please
[warn] [35m[Appium] [39m add 'automationName=UiAutomator1' to your desired capabilities
[warn] [35m[Appium] [39m
[warn] [35m[Appium] [39m For more information about drivers, please visit
[warn] [35m[Appium] [39m http://appium.io/docs/en/about-appium/intro/ and explore the
[warn] [35m[Appium] [39m 'Drivers' menu
[warn] [35m[Appium] [39m
[warn] [35m[Appium] [39m ======================================================================
[warn] [35m[Appium] [39m
[info] [35m[Appium] [39m Appium v1.15.1 creating new AndroidUiautomator2Driver (v1.37.2) session
[debug] [35m[BaseDriver] [39m W3C capabilities and MJSONWP desired capabilities were provided
[debug] [35m[BaseDriver] [39m Creating session with W3C capabilities: {
[debug] [35m[BaseDriver] [39m "alwaysMatch": {
[debug] [35m[BaseDriver] [39m "platformName": "Android",
[debug] [35m[BaseDriver] [39m "appium:deviceName": "HUAWEI P30",
[debug] [35m[BaseDriver] [39m "appium:automationName": "appium",
[debug] [35m[BaseDriver] [39m "appium:platformVersion": "10",
[debug] [35m[BaseDriver] [39m "appium:appPackage": "com.rfchina.app.supercommunity.Dev",
[debug] [35m[BaseDriver] [39m "appium:appActivity": "com.rfchina.app.supercommunity.SplashActivity",
[debug] [35m[BaseDriver] [39m "appium:noReset": true
[debug] [35m[BaseDriver] [39m },
[debug] [35m[BaseDriver] [39m "firstMatch": [
[debug] [35m[BaseDriver] [39m {}
[debug] [35m[BaseDriver] [39m ]
[debug] [35m[BaseDriver] [39m }
[info] [35m[BaseDriver] [39m Session created with session id: f29fa665-5d4a-418b-b9ef-26b4f1f245de
[info] [35m[UiAutomator2] [39m Starting 'com.rfchina.app.supercommunity.Dev' directly on the device[info] [35m[ADB] [39m Using 'adb.exe' from 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe'
[info] [35m[AndroidDriver] [39m Retrieving device list
[debug] [35m[ADB] [39m Trying to find a connected android device
[debug] [35m[ADB] [39m Getting connected devices...[debug] [35m[ADB] [39m Connected devices: [{"udid":"GBG0219924001608","state":"device"}]
[info] [35m[AndroidDriver] [39m Looking for a device with Android '10'
[debug] [35m[ADB] [39m Setting device id to GBG0219924001608
[info] [35m[ADB] [39m Getting device platform version
[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 shell getprop ro.build.version.release'[debug] [35m[ADB] [39m Current device property 'ro.build.version.release': 10
[info] [35m[AndroidDriver] [39m Using device: GBG0219924001608
[info] [35m[ADB] [39m Using 'adb.exe' from 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe'
[debug] [35m[ADB] [39m Setting device id to GBG0219924001608
[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 shell getprop ro.build.version.sdk'[debug] [35m[ADB] [39m Current device property 'ro.build.version.sdk': 29
[debug] [35m[ADB] [39m Device API level: 29
[warn] [35m[UiAutomator2] [39m Relaxing hidden api policy
[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 shell settings put global hidden_api_policy_pre_p_apps 1'[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 shell settings put global hidden_api_policy_p_apps 1'[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 shell settings put global hidden_api_policy 1'[warn] [35m[AndroidDriver] [39m No app sent in, not parsing package/activity
[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 wait-for-device'[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 shell echo ping'[debug] [35m[AndroidDriver] [39m Pushing settings apk to device...
[debug] [35m[ADB] [39m Getting install status for io.appium.settings
[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 shell dumpsys package io.appium.settings'[debug] [35m[ADB] [39m 'io.appium.settings' is installed
[debug] [35m[ADB] [39m Getting package info for 'io.appium.settings'
[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 shell dumpsys package io.appium.settings'[info] [35m[ADB] [39m Cannot extract apk info using apkanalyzer. Falling back to aapt. Original error: Could not find 'apkanalyzer.bat' in ["C:\\Users\\XXX\\Downloads\\AndroidSDK\\Android_SDK_windows\\platform-tools\\apkanalyzer.bat","C:\\Users\\XXX\\Downloads\\AndroidSDK\\Android_SDK_windows\\emulator\\apkanalyzer.bat","C:\\Users\\XXX\\Downloads\\AndroidSDK\\Android_SDK_windows\\tools\\apkanalyzer.bat","C:\\Users\\XXX\\Downloads\\AndroidSDK\\Android_SDK_windows\\tools\\bin\\apkanalyzer.bat","C:\\Users\\XXX\\Downloads\\AndroidSDK\\Android_SDK_windows\\build-tools\\19.1.0\\apkanalyzer.bat"]. Do you have Android Build Tools installed at 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows'?
[info] [35m[ADB] [39m Using 'aapt.exe' from 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\build-tools\19.1.0\aapt.exe'[debug] [35m[ADB] [39m The version name of the installed 'io.appium.settings' is greater or equal to the application version name ('2.14.2' >= '2.14.2')
[debug] [35m[ADB] [39m There is no need to install/upgrade 'C:\Users\XXX\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\io.appium.settings\apks\settings_apk-debug.apk'
[debug] [35m[ADB] [39m Getting IDs of all 'io.appium.settings' processes
[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 shell 'pgrep --help; echo $?''[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 shell pgrep -f io\\.appium\\.settings'[debug] [35m[AndroidDriver] [39m io.appium.settings is already running. There is no need to reset its permissions.
[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 shell appops set io.appium.settings android\:mock_location allow'[debug] [35m[Logcat] [39m Starting logcat capture[debug] [35m[ADB] [39m Getting install status for io.appium.uiautomator2.server
[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 shell dumpsys package io.appium.uiautomator2.server'[debug] [35m[ADB] [39m 'io.appium.uiautomator2.server' is installed
[debug] [35m[ADB] [39m Getting package info for 'io.appium.uiautomator2.server'
[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 shell dumpsys package io.appium.uiautomator2.server'[info] [35m[ADB] [39m Cannot extract apk info using apkanalyzer. Falling back to aapt. Original error: Could not find 'apkanalyzer.bat' in ["C:\\Users\\XXX\\Downloads\\AndroidSDK\\Android_SDK_windows\\platform-tools\\apkanalyzer.bat","C:\\Users\\XXX\\Downloads\\AndroidSDK\\Android_SDK_windows\\emulator\\apkanalyzer.bat","C:\\Users\\XXX\\Downloads\\AndroidSDK\\Android_SDK_windows\\tools\\apkanalyzer.bat","C:\\Users\\XXX\\Downloads\\AndroidSDK\\Android_SDK_windows\\tools\\bin\\apkanalyzer.bat","C:\\Users\\XXX\\Downloads\\AndroidSDK\\Android_SDK_windows\\build-tools\\19.1.0\\apkanalyzer.bat"]. Do you have Android Build Tools installed at 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows'?[debug] [35m[ADB] [39m The version name of the installed 'io.appium.uiautomator2.server' is greater or equal to the application version name ('4.3.0' >= '4.3.0')
[debug] [35m[UiAutomator2] [39m io.appium.uiautomator2.server installation state: sameVersionInstalled
[debug] [35m[ADB] [39m Checking app cert for C:\Users\XXX\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.3.0.apk
[warn] [35m[ADB] [39m Cannot use apksigner tool for signature verification. Original error: Could not find 'apksigner.bat' in ["C:\\Users\\XXX\\Downloads\\AndroidSDK\\Android_SDK_windows\\platform-tools\\apksigner.bat","C:\\Users\\XXX\\Downloads\\AndroidSDK\\Android_SDK_windows\\emulator\\apksigner.bat","C:\\Users\\XXX\\Downloads\\AndroidSDK\\Android_SDK_windows\\tools\\apksigner.bat","C:\\Users\\XXX\\Downloads\\AndroidSDK\\Android_SDK_windows\\tools\\bin\\apksigner.bat","C:\\Users\\XXX\\Downloads\\AndroidSDK\\Android_SDK_windows\\build-tools\\19.1.0\\apksigner.bat"]. Do you have Android Build Tools installed at 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows'?
[debug] [35m[ADB] [39m Defaulting to verify.jar[debug] [35m[ADB] [39m 'C:\Users\XXX\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.3.0.apk' is already signed.
[debug] [35m[ADB] [39m Getting install status for io.appium.uiautomator2.server.test
[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 shell dumpsys package io.appium.uiautomator2.server.test'[debug] [35m[ADB] [39m 'io.appium.uiautomator2.server.test' is installed
[debug] [35m[ADB] [39m Checking app cert for C:\Users\XXX\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
[warn] [35m[ADB] [39m Cannot use apksigner tool for signature verification. Original error: Could not find 'apksigner.bat' in ["C:\\Users\\XXX\\Downloads\\AndroidSDK\\Android_SDK_windows\\platform-tools\\apksigner.bat","C:\\Users\\XXX\\Downloads\\AndroidSDK\\Android_SDK_windows\\emulator\\apksigner.bat","C:\\Users\\XXX\\Downloads\\AndroidSDK\\Android_SDK_windows\\tools\\apksigner.bat","C:\\Users\\XXX\\Downloads\\AndroidSDK\\Android_SDK_windows\\tools\\bin\\apksigner.bat","C:\\Users\\XXX\\Downloads\\AndroidSDK\\Android_SDK_windows\\build-tools\\19.1.0\\apksigner.bat"]. Do you have Android Build Tools installed at 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows'?
[debug] [35m[ADB] [39m Defaulting to verify.jar[debug] [35m[ADB] [39m 'C:\Users\XXX\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk' is already signed.
[info] [35m[UiAutomator2] [39m Server packages are not going to be (re)installed
[debug] [35m[UiAutomator2] [39m Waiting up to 30000ms for services to be available
[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 shell pm list instrumentation'[debug] [35m[UiAutomator2] [39m Instrumentation target 'io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner' is available
[debug] [35m[UiAutomator2] [39m Forwarding UiAutomator2 Server port 6790 to 8200
[debug] [35m[ADB] [39m Forwarding system: 8200 to device: 6790
[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 forward tcp\:8200 tcp\:6790'[debug] [35m[UiAutomator2] [39m No app capability. Assuming it is already on the device
[debug] [35m[UiAutomator2] [39m Performing shallow cleanup of automation leftovers
[debug] [35m[UiAutomator2] [39m No obsolete sessions have been detected (Error: read ECONNRESET)
[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 shell am force-stop io.appium.uiautomator2.server.test'[info] [35m[UiAutomator2] [39m Starting UIAutomator2 server 4.3.0
[info] [35m[UiAutomator2] [39m Using UIAutomator2 server from 'C:\Users\XXX\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.3.0.apk' and test from 'C:\Users\XXX\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk'
[info] [35m[UiAutomator2] [39m Waiting up to 30000ms for UiAutomator2 to be online...
[debug] [35m[ADB] [39m Creating ADB subprocess with args: ["-P",5037,"-s","GBG0219924001608","shell","am","instrument","-w","io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner"][debug] [35m[WD Proxy] [39m Matched '/status' to command name 'getStatus'
[debug] [35m[WD Proxy] [39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[info] [35m[WD Proxy] [39m Got an unexpected response with status undefined: {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"}[debug] [35m[Instrumentation] [39m io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:[debug] [35m[WD Proxy] [39m Matched '/status' to command name 'getStatus'
[debug] [35m[WD Proxy] [39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[info] [35m[WD Proxy] [39m Got an unexpected response with status undefined: {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"}[debug] [35m[WD Proxy] [39m Matched '/status' to command name 'getStatus'
[debug] [35m[WD Proxy] [39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[info] [35m[WD Proxy] [39m Got an unexpected response with status undefined: {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"}[debug] [35m[WD Proxy] [39m Matched '/status' to command name 'getStatus'
[debug] [35m[WD Proxy] [39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [35m[WD Proxy] [39m Got response with status 200: {"sessionId":"None","value":{"ready":true,"message":"UiAutomator2 Server is ready to accept commands"}}
[debug] [35m[UiAutomator2] [39m The initialization of the instrumentation process took 4136ms
[debug] [35m[WD Proxy] [39m Matched '/session' to command name 'createSession'
[debug] [35m[WD Proxy] [39m Proxying [POST /session] to [POST http://localhost:8200/wd/hub/session] with body: {"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","deviceName":"HUAWEI P30","automationName":"appium","platformVersion":"10","appPackage":"com.rfchina.app.supercommunity.Dev","appActivity":"com.rfchina.app.supercommunity.SplashActivity","noReset":true},"platformName":"Android","deviceName":"GBG0219924001608","automationName":"appium","platformVersion":"10","appPackage":"com.rfchina.app.supercommunity.Dev","appActivity":"com.rfchina.app.supercommunity.SplashActivity","noReset":true,"deviceUDID":"GBG0219924001608"}],"alwaysMatch":{}}}
[debug] [35m[WD Proxy] [39m Got response with status 200: {"sessionId":"3909c606-658c-4039-b78d-91185a114c6d","value":{"sessionId":"3909c606-658c-4039-b78d-91185a114c6d","capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","deviceName":"HUAWEI P30","automationName":"appium","platformVersion":"10","appPackage":"com.rfchina.app.supercommunity.Dev","appActivity":"com.rfchina.app.supercommunity.SplashActivity","noReset":true},"platformName":"Android","deviceName":"GBG0219924001608","automationName":"appium","platformVersion":"10","appPackage":"com.rfchina.app.supercommunity.Dev","appActivity":"com.rfchina.app.supercommunity.SplashActivity","noReset":true,"deviceUDID":"GBG0219924001608"}],"alwaysMatch":{}}}}
[info] [35m[WD Proxy] [39m Determined the downstream protocol as 'W3C'
[debug] [35m[WD Proxy] [39m Proxying [GET /appium/device/info] to [GET http://localhost:8200/wd/hub/session/3909c606-658c-4039-b78d-91185a114c6d/appium/device/info] with no body
[debug] [35m[WD Proxy] [39m Got response with status 200: {"sessionId":"3909c606-658c-4039-b78d-91185a114c6d","value":{"androidId":"ffca75054a4dbbc2","manufacturer":"HUAWEI","model":"ELE-AL00","brand":"HUAWEI","apiVersion":"29","platformVersion":"10","carrierName":"中国联通","realDisplaySize":"1080x2340","displayDensity":480,"networks":[{"type":0,"typeName":"MOBILE","subtype":13,"subtypeName":"LTE","isConnected":true,"detailedState":"CONNECTED","state":"CONNECTED","extraInfo":"3gnet","isAvailable":true,"isFailover":false,"isRoaming":false,"capabilities":{"transportTypes":"NET_CAPABILITY_MMS","networkCapabilities":"","linkUpstreamBandwidthKbps":51200,"linkDownBandwidthKbps":102400,"signalStrength":-2147483648,"networkSpecifier":"1","SSID":null}}],"locale":"zh_CN_#Hans","timeZone":"Asia\/Shanghai"}}
[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 shell dumpsys window'[info] [35m[AndroidDriver] [39m Screen already unlocked, doing nothing
[info] [35m[UiAutomator2] [39m Starting 'com.rfchina.app.supercommunity.Dev/com.rfchina.app.supercommunity.SplashActivity and waiting for 'com.rfchina.app.supercommunity.Dev/com.rfchina.app.supercommunity.SplashActivity'
[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 shell am start -W -n com.rfchina.app.supercommunity.Dev/com.rfchina.app.supercommunity.SplashActivity -S'[debug] [35m[WD Proxy] [39m Proxying [GET /appium/device/pixel_ratio] to [GET http://localhost:8200/wd/hub/session/3909c606-658c-4039-b78d-91185a114c6d/appium/device/pixel_ratio] with body: {}
[debug] [35m[WD Proxy] [39m Got response with status 200: {"sessionId":"3909c606-658c-4039-b78d-91185a114c6d","value":3}
[debug] [35m[WD Proxy] [39m Matched '/appium/device/system_bars' to command name 'getSystemBars'
[debug] [35m[WD Proxy] [39m Proxying [GET /appium/device/system_bars] to [GET http://localhost:8200/wd/hub/session/3909c606-658c-4039-b78d-91185a114c6d/appium/device/system_bars] with body: {}
[debug] [35m[WD Proxy] [39m Got response with status 200: {"sessionId":"3909c606-658c-4039-b78d-91185a114c6d","value":{"statusBar":75}}
[debug] [35m[WD Proxy] [39m Matched '/window/current/size' to command name 'getWindowSize'
[debug] [35m[WD Proxy] [39m Proxying [GET /window/current/size] to [GET http://localhost:8200/wd/hub/session/3909c606-658c-4039-b78d-91185a114c6d/window/current/size] with body: {}
[debug] [35m[WD Proxy] [39m Got response with status 200: {"sessionId":"3909c606-658c-4039-b78d-91185a114c6d","value":{"height":2265,"width":1080}}
[info] [35m[Appium] [39m New AndroidUiautomator2Driver session created successfully, session f29fa665-5d4a-418b-b9ef-26b4f1f245de added to master session list
[debug] [35m[BaseDriver] [39m Event 'newSessionStarted' logged at 1589799263922 (18:54:23 GMT+0800 (中国标准时间))
[debug] [35m[W3C (f29fa665)] [39m Cached the protocol value 'W3C' for the new session f29fa665-5d4a-418b-b9ef-26b4f1f245de
[debug] [35m[W3C (f29fa665)] [39m Responding to client with driver.createSession() result: {"capabilities":{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","deviceName":"HUAWEI P30","automationName":"appium","platformVersion":"10","appPackage":"com.rfchina.app.supercommunity.Dev","appActivity":"com.rfchina.app.supercommunity.SplashActivity","noReset":true},"platformName":"Android","deviceName":"GBG0219924001608","automationName":"appium","platformVersion":"10","appPackage":"com.rfchina.app.supercommunity.Dev","appActivity":"com.rfchina.app.supercommunity.SplashActivity","noReset":true,"deviceUDID":"GBG0219924001608","deviceApiLevel":29,"deviceScreenSize":"1080x2340","deviceScreenDensity":480,"deviceModel":"ELE-AL00","deviceManufacturer":"HUAWEI","pixelRatio":3,"statBarHeight":75,"viewportRect":{"left":0,"top":75,"width":1080,"height":2190}}}
[info] [35m[HTTP] [39m [37m<-- POST /wd/hub/session [39m [32m200 [39m [90m36920 ms - 1005 [39m
[info] [35m[HTTP] [39m [90m [39m
[info] [35m[HTTP] [39m [37m--> [39m [37mPOST [39m [37m/wd/hub/session/f29fa665-5d4a-418b-b9ef-26b4f1f245de/appium/device/app_installed [39m
[info] [35m[HTTP] [39m [90m{"bundleId":"com.rfchina.app.supercommunity.Dev"} [39m
[debug] [35m[W3C (f29fa665)] [39m Calling AppiumDriver.isAppInstalled() with args: ["com.rfchina.app.supercommunity.Dev","f29fa665-5d4a-418b-b9ef-26b4f1f245de"]
[debug] [35m[ADB] [39m Getting install status for com.rfchina.app.supercommunity.Dev
[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 shell dumpsys package com.rfchina.app.supercommunity.Dev'[debug] [35m[ADB] [39m 'com.rfchina.app.supercommunity.Dev' is installed
[debug] [35m[W3C (f29fa665)] [39m Responding to client with driver.isAppInstalled() result: true
[info] [35m[HTTP] [39m [37m<-- POST /wd/hub/session/f29fa665-5d4a-418b-b9ef-26b4f1f245de/appium/device/app_installed [39m [32m200 [39m [90m1218 ms - 14 [39m
[info] [35m[HTTP] [39m [90m [39m
[info] [35m[HTTP] [39m [37m--> [39m [37mPOST [39m [37m/wd/hub/session/f29fa665-5d4a-418b-b9ef-26b4f1f245de/element [39m
[info] [35m[HTTP] [39m [90m{"using":"id","value":"com.rfchina.app.supercommunity.Dev:id/ivIcon"} [39m
[debug] [35m[W3C (f29fa665)] [39m Calling AppiumDriver.findElement() with args: ["id","com.rfchina.app.supercommunity.Dev:id/ivIcon","f29fa665-5d4a-418b-b9ef-26b4f1f245de"]
[debug] [35m[BaseDriver] [39m Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [35m[BaseDriver] [39m Waiting up to 0 ms for condition
[debug] [35m[WD Proxy] [39m Matched '/element' to command name 'findElement'
[debug] [35m[WD Proxy] [39m Proxying [POST /element] to [POST http://localhost:8200/wd/hub/session/3909c606-658c-4039-b78d-91185a114c6d/element] with body: {"strategy":"id","selector":"com.rfchina.app.supercommunity.Dev:id/ivIcon","context":"","multiple":false}[debug] [35m[WD Proxy] [39m Got response with status 200: {"sessionId":"3909c606-658c-4039-b78d-91185a114c6d","value":{"ELEMENT":"bc40931c-ad8a-4196-8286-1a84616d5c6f","element-6066-11e4-a52e-4f735466cecf":"bc40931c-ad8a-4196-8286-1a84616d5c6f"}}
[debug] [35m[W3C (f29fa665)] [39m Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"bc40931c-ad8a-4196-8286-1a84616d5c6f","ELEMENT":"bc40931c-ad8a-4196-8286-1a84616d5c6f"}
[info] [35m[HTTP] [39m [37m<-- POST /wd/hub/session/f29fa665-5d4a-418b-b9ef-26b4f1f245de/element [39m [32m200 [39m [90m1597 ms - 137 [39m
[info] [35m[HTTP] [39m [90m [39m
[info] [35m[HTTP] [39m [37m--> [39m [37mPOST [39m [37m/wd/hub/session/f29fa665-5d4a-418b-b9ef-26b4f1f245de/element/bc40931c-ad8a-4196-8286-1a84616d5c6f/click [39m
[info] [35m[HTTP] [39m [90m{"id":"bc40931c-ad8a-4196-8286-1a84616d5c6f"} [39m
[debug] [35m[W3C (f29fa665)] [39m Calling AppiumDriver.click() with args: ["bc40931c-ad8a-4196-8286-1a84616d5c6f","f29fa665-5d4a-418b-b9ef-26b4f1f245de"]
[debug] [35m[WD Proxy] [39m Matched '/element/bc40931c-ad8a-4196-8286-1a84616d5c6f/click' to command name 'click'
[debug] [35m[WD Proxy] [39m Proxying [POST /element/bc40931c-ad8a-4196-8286-1a84616d5c6f/click] to [POST http://localhost:8200/wd/hub/session/3909c606-658c-4039-b78d-91185a114c6d/element/bc40931c-ad8a-4196-8286-1a84616d5c6f/click] with body: {"element":"bc40931c-ad8a-4196-8286-1a84616d5c6f"}[debug] [35m[WD Proxy] [39m Got response with status 200: {"sessionId":"3909c606-658c-4039-b78d-91185a114c6d","value":null}
[debug] [35m[W3C (f29fa665)] [39m Responding to client with driver.click() result: null
[info] [35m[HTTP] [39m [37m<-- POST /wd/hub/session/f29fa665-5d4a-418b-b9ef-26b4f1f245de/element/bc40931c-ad8a-4196-8286-1a84616d5c6f/click [39m [32m200 [39m [90m51 ms - 14 [39m
[info] [35m[HTTP] [39m [90m [39m
[info] [35m[HTTP] [39m [37m--> [39m [37mDELETE [39m [37m/wd/hub/session/f29fa665-5d4a-418b-b9ef-26b4f1f245de [39m
[info] [35m[HTTP] [39m [90m{} [39m
[debug] [35m[W3C (f29fa665)] [39m Calling AppiumDriver.deleteSession() with args: ["f29fa665-5d4a-418b-b9ef-26b4f1f245de"]
[debug] [35m[BaseDriver] [39m Event 'quitSessionRequested' logged at 1589799266799 (18:54:26 GMT+0800 (中国标准时间))
[info] [35m[Appium] [39m Removing session f29fa665-5d4a-418b-b9ef-26b4f1f245de from our master session list
[debug] [35m[UiAutomator2] [39m Deleting UiAutomator2 session
[debug] [35m[UiAutomator2] [39m Deleting UiAutomator2 server session
[debug] [35m[WD Proxy] [39m Matched '/' to command name 'deleteSession'
[debug] [35m[WD Proxy] [39m Proxying [DELETE /] to [DELETE http://localhost:8200/wd/hub/session/3909c606-658c-4039-b78d-91185a114c6d] with no body
[debug] [35m[WD Proxy] [39m Got response with status 200: {"sessionId":"3909c606-658c-4039-b78d-91185a114c6d","value":null}
[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 shell am force-stop com.rfchina.app.supercommunity.Dev'[debug] [35m[Instrumentation] [39m .[debug] [35m[Logcat] [39m Stopping logcat capture
[debug] [35m[ADB] [39m Removing forwarded port socket connection: 8200
[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 forward --remove tcp\:8200'
[debug] [35m[Instrumentation] [39m Time: 9.029
[debug] [35m[Instrumentation] [39m
[debug] [35m[Instrumentation] [39m OK (1 test)
[debug] [35m[Instrumentation] [39m The process has exited with code 0[info] [35m[UiAutomator2] [39m Restoring hidden api policy to the device default configuration
[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 shell settings delete global hidden_api_policy_pre_p_apps'[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 shell settings delete global hidden_api_policy_p_apps'[debug] [35m[ADB] [39m Running 'C:\Users\XXX\Downloads\AndroidSDK\Android_SDK_windows\platform-tools\adb.exe -P 5037 -s GBG0219924001608 shell settings delete global hidden_api_policy'[debug] [35m[BaseDriver] [39m Event 'quitSessionFinished' logged at 1589799272891 (18:54:32 GMT+0800 (中国标准时间))
[debug] [35m[W3C (f29fa665)] [39m Received response: null
[debug] [35m[W3C (f29fa665)] [39m But deleting session, so not returning
[debug] [35m[W3C (f29fa665)] [39m Responding to client with driver.deleteSession() result: null
[info] [35m[HTTP] [39m [37m<-- DELETE /wd/hub/session/f29fa665-5d4a-418b-b9ef-26b4f1f245de [39m [32m200 [39m [90m6090 ms - 14 [39m
[info] [35m[HTTP] [39m [90m [39m