appium系列-日志详解

Microsoft Windows [版本 10.0.18363.1016]
(c) 2019 Microsoft Corporation。保留所有权利。

C:\Users\lnz>appium
[Appium] Welcome to Appium v1.15.1
#端口开启
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
#接收到创建会话的请求
[HTTP] --> POST /wd/hub/session
#请求体数据
[HTTP] {"capabilities":{"firstMatch":[{"platformName":"Android","appium:deviceName":"Android Emulator","appium:appPackage":"com.xueqiu.android","appium:appActivity":".view.WelcomeActivityAlias","appium:autoGrantPermissions":"true","appium:noReset":"true","appium:newCommandTimeout":"180","appium:udid":null,"appium:systemPort":42380,"appium:mjpegServerPort":42381}]},"desiredCapabilities":{"platformName":"Android","deviceName":"Android Emulator","appPackage":"com.xueqiu.android","appActivity":".view.WelcomeActivityAlias","autoGrantPermissions":"true","noReset":"true","newCommandTimeout":"180","udid":null,"systemPort":42380,"mjpegServerPort":42381}}
#调用AppiumDrive创建session
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"platformName":"Android","deviceName":"Android Emulator","appPackage":"com.xueqiu.android","appActivity":".view.WelcomeActivityAlias","autoGrantPermissions":"true","noReset":"true","newCommandTimeout":"180","udid":null,"systemPort":42380,"mjpegServerPort":42381},null,{"firstMatch":[{"platformName":"Android","appium:deviceName":"Android Emulator","appium:appPackage":"com.xueqiu.android","appium:appActivity":".view.WelcomeActivityAlias","appium:autoGrantPermissions":"true","appium:noReset":"true","appium:newCommandTimeout":"180","appium:udid":null,"appium:systemPort":42380,"appium:mjpegServerPort":42381}]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1599533600101 (10:53:20 GMT+0800 (GMT+08:00))
[BaseDriver] Number capability passed in as string. Functionality may be compromised.
[Appium]
[Appium] ======================================================================
[Appium]   DEPRECATION WARNING:
[Appium]
[Appium]   The 'automationName' capability was not provided in the desired
[Appium]   capabilities for this Android session
[Appium]
[Appium]   Setting 'automationName=UiAutomator2' by default and using the
[Appium]   UiAutomator2 Driver
[Appium]
[Appium]   The next major version of Appium (2.x) will **require** the
[Appium]   'automationName' capability to be set for all sessions on all
[Appium]   platforms
[Appium]
[Appium]   In previous versions (Appium <= 1.13.x), the default was
[Appium]   'automationName=UiAutomator1'
[Appium]
[Appium]   If you wish to use that automation instead of UiAutomator2, please
[Appium]   add 'automationName=UiAutomator1' to your desired capabilities
[Appium]
[Appium]   For more information about drivers, please visit
[Appium]   http://appium.io/docs/en/about-appium/intro/ and explore the
[Appium]   'Drivers' menu
[Appium]
[Appium] ======================================================================
[Appium]
#创建新的AndroidUiautomator2Driver(v1.37.2)会话
[Appium] Appium v1.15.1 creating new AndroidUiautomator2Driver (v1.37.2) session
#提供了W3C功能和MJSONWP所需的功能
[debug] [BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
#使用capabilities数据创建会话
[debug] [BaseDriver] Creating session with W3C capabilities: {
[debug] [BaseDriver]   "alwaysMatch": {
[debug] [BaseDriver]     "platformName": "Android",
[debug] [BaseDriver]     "appium:deviceName": "Android Emulator",
[debug] [BaseDriver]     "appium:appPackage": "com.xueqiu.android",
[debug] [BaseDriver]     "appium:appActivity": ".view.WelcomeActivityAlias",
[debug] [BaseDriver]     "appium:autoGrantPermissions": "true",
[debug] [BaseDriver]     "appium:noReset": "true",
[debug] [BaseDriver]     "appium:newCommandTimeout": "180",
[debug] [BaseDriver]     "appium:udid": null,
[debug] [BaseDriver]     "appium:systemPort": 42380,
[debug] [BaseDriver]     "appium:mjpegServerPort": 42381
[debug] [BaseDriver]   },
[debug] [BaseDriver]   "firstMatch": [
[debug] [BaseDriver]     {}
[debug] [BaseDriver]   ]
[debug] [BaseDriver] }
[BaseDriver] Number capability passed in as string. Functionality may be compromised.
[BaseDriver] Capability 'noReset' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Capability 'autoGrantPermissions' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Capability 'newCommandTimeout' changed from string ('180') to integer (180). This may cause unexpected behavior
[BaseDriver] The following capabilities were provided, but are not recognized by Appium:
[BaseDriver]   mjpegServerPort
#创建成功会话id:02fcf169-ae94-49ed-93ed-909781f1a452
[BaseDriver] Session created with session id: 02fcf169-ae94-49ed-93ed-909781f1a452
#开启雪球app
[UiAutomator2] Starting 'com.xueqiu.android' directly on the device
#找到3个 'build-tools' folders  在'D:\Program Files (x86)\appium\sdk'下
[ADB] Found 3 'build-tools' folders under 'D:\Program Files (x86)\appium\sdk' (newest first):
[ADB]     D:/Program Files (x86)/appium/sdk/build-tools/29.0.3
[ADB]     D:/Program Files (x86)/appium/sdk/build-tools/29.0.2
[ADB]     D:/Program Files (x86)/appium/sdk/build-tools/28.0.3
#使用adb
[ADB] Using 'adb.exe' from 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe'
#获取设备列表
[AndroidDriver] Retrieving device list
#尝试找到一个连接的安卓设备
[debug] [ADB] Trying to find a connected android device
#正在连接设备
[debug] [ADB] Getting connected devices...
#连接到的设备列表
[debug] [ADB] Connected devices: [{"udid":"127.0.0.1:7555","state":"device"}]
#使用设备 127.0.0.1:7555
[AndroidDriver] Using device: 127.0.0.1:7555
#使用adb
[ADB] Using 'adb.exe' from 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe'
#设置设备id
[debug] [ADB] Setting device id to 127.0.0.1:7555
#获取adb命令获取sdk版本信息
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell getprop ro.build.version.sdk'
#获取到了版本信息:23
[debug] [ADB] Current device property 'ro.build.version.sdk': 23
[debug] [ADB] Device API level: 23
[AndroidDriver] No app sent in, not parsing package/activity
#等待设备
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 wait-for-device'
#ping
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell echo ping'
#推送io.appium.settings  apk文件到设备
[debug] [AndroidDriver] Pushing settings apk to device...
#获取io.appium.settings 的安装状态
[debug] [ADB] Getting install status for io.appium.settings
#运行adb命令 检查io.appium.settings 的安装状态
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell dumpsys package io.appium.settings'
#运行结果是未安装
[debug] [ADB] 'io.appium.settings' is not installed
[debug] [ADB] App 'C:\Users\lnz\AppData\Roaming\npm\node_modules\appium\node_modules\io.appium.settings\apks\settings_apk-debug.apk' is not installed

[debug] [ADB] Installing 'C:\Users\lnz\AppData\Roaming\npm\node_modules\appium\node_modules\io.appium.settings\apks\settings_apk-debug.apk'

[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell 'ls -t -1 /data/local/tmp/appium_cache 2>&1 || echo _ERROR_''
[debug] [ADB] The current Android API does not support extended ls options. Defaulting to no-options call
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell 'ls /data/local/tmp/appium_cache 2>&1 || echo _ERROR_''
[debug] [ADB] The count of applications in the cache: 4
[ADB] The application at 'C:\Users\lnz\AppData\Roaming\npm\node_modules\appium\node_modules\io.appium.settings\apks\settings_apk-debug.apk' is already cached to '/data/local/tmp/appium_cache/3d97225b036c28750562ef8962defee6b1af19a4.apk'
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell pm install -g /data/local/tmp/appium_cache/3d97225b036c28750562ef8962defee6b1af19a4.apk'
[ADB] The installation of 'settings_apk-debug.apk' took 0.504s
[debug] [ADB] Install command stdout: pkg: /data/local/tmp/appium_cache/3d97225b036c28750562ef8962defee6b1af19a4.apk
[debug] [ADB] Success
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell 'pgrep --help; echo $?''
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell pgrep -f io\\.appium\\.settings'
[AndroidDriver] Granting android.permission.SET_ANIMATION_SCALE, CHANGE_CONFIGURATION, ACCESS_FINE_LOCATION by pm grant
#为'io.appium.settings' 授权
[debug] [ADB] Granting permissions ["android.permission.SET_ANIMATION_SCALE","android.permission.CHANGE_CONFIGURATION","android.permission.ACCESS_FINE_LOCATION"] to 'io.appium.settings'
[debug] [ADB] Got the following command chunks to execute: [["pm","grant","io.appium.settings","android.permission.SET_ANIMATION_SCALE",";","pm","grant","io.appium.settings","android.permission.CHANGE_CONFIGURATION",";","pm","grant","io.appium.settings","android.permission.ACCESS_FINE_LOCATION",";"]]
#授权
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell pm grant io.appium.settings android.permission.SET_ANIMATION_SCALE \; pm grant io.appium.settings android.permission.CHANGE_CONFIGURATION \; pm grant io.appium.settings android.permission.ACCESS_FINE_LOCATION \;'
# 启动io.appium.settings ,指定启动.Settings  Activity ,指定 action 为android.intent.action.MAIN
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell am start -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER'
#获取进程id
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
#运行命令 获取io.appium.settings 的进行id
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell pgrep -f io\\.appium\\.settings'
#设备模拟位置允许
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell appops set io.appium.settings android\:mock_location allow'
#开始捕获日志
[debug] [Logcat] Starting logcat capture
#获取io.appium.uiautomator2.server的安装状态
[debug] [ADB] Getting install status for io.appium.uiautomator2.server
#运行命令去获取
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell dumpsys package io.appium.uiautomator2.server'
#结果是未安装的
[debug] [ADB] 'io.appium.uiautomator2.server' is not installed
[debug] [ADB] App 'C:\Users\lnz\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.3.0.apk' is not installed
[debug] [UiAutomator2] io.appium.uiautomator2.server installation state: notInstalled
#检查app的签名
[debug] [ADB] Checking app cert for C:\Users\lnz\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.3.0.apk
[ADB] Using 'apksigner.bat' from 'D:\Program Files (x86)\appium\sdk\build-tools\29.0.3\apksigner.bat'
[debug] [ADB] Starting 'D:\Program Files (x86)\appium\sdk\build-tools\29.0.3\apksigner.bat' with args '["verify","--print-certs","C:\\Users\\lnz\\AppData\\Roaming\\npm\\node_modules\\appium\\node_modules\\appium-uiautomator2-server\\apks\\appium-uiautomator2-server-v4.3.0.apk"]'
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [ADB]
[debug] [ADB] 'C:\Users\lnz\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.3.0.apk' is already signed.
#获取io.appium.uiautomator2.server.test 的安装状态
[debug] [ADB] Getting install status for io.appium.uiautomator2.server.test
#运行adb命令
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell dumpsys package io.appium.uiautomator2.server.test'
[debug] [ADB] 'io.appium.uiautomator2.server.test' is not installed
#检查签名
[debug] [ADB] Checking app cert for C:\Users\lnz\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
[debug] [ADB] Starting 'D:\Program Files (x86)\appium\sdk\build-tools\29.0.3\apksigner.bat' with args '["verify","--print-certs","C:\\Users\\lnz\\AppData\\Roaming\\npm\\node_modules\\appium\\node_modules\\appium-uiautomator2-server\\apks\\appium-uiautomator2-server-debug-androidTest.apk"]'
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [ADB]
[debug] [ADB] 'C:\Users\lnz\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk' is already signed.
[UiAutomator2] Server packages are going to be (re)installed
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell 'ls /data/local/tmp/appium_cache 2>&1 || echo _ERROR_''
[debug] [ADB] The count of applications in the cache: 4
[ADB] The application at 'C:\Users\lnz\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.3.0.apk' is already cached to '/data/local/tmp/appium_cache/0cc1725a60a05dbb5d0d09256f2fc6ece7e3b10f.apk'
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell pm install -r /data/local/tmp/appium_cache/0cc1725a60a05dbb5d0d09256f2fc6ece7e3b10f.apk'
[ADB] The installation of 'appium-uiautomator2-server-v4.3.0.apk' took 0.678s
[debug] [ADB] Install command stdout: pkg: /data/local/tmp/appium_cache/0cc1725a60a05dbb5d0d09256f2fc6ece7e3b10f.apk
[debug] [ADB] Success
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell 'ls /data/local/tmp/appium_cache 2>&1 || echo _ERROR_''
[debug] [ADB] The count of applications in the cache: 4
[ADB] The application at 'C:\Users\lnz\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk' is already cached to '/data/local/tmp/appium_cache/cd247f042368990c9f33b2d7bf2390d8cf4f4e24.apk'
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell pm install -r /data/local/tmp/appium_cache/cd247f042368990c9f33b2d7bf2390d8cf4f4e24.apk'
[ADB] The installation of 'appium-uiautomator2-server-debug-androidTest.apk' took 0.565s
[debug] [ADB] Install command stdout: pkg: /data/local/tmp/appium_cache/cd247f042368990c9f33b2d7bf2390d8cf4f4e24.apk
[debug] [ADB] Success
#等待UiAutomator2 server服务启动
[debug] [UiAutomator2] Waiting up to 30000ms for services to be available
#列出测试包
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell pm list instrumentation'
[debug] [UiAutomator2] Instrumentation target 'io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner' is available
[debug] [UiAutomator2] Forwarding UiAutomator2 Server port 6790 to 42380
#准备转发appium上的 端口42380  到设备上的端口6790
[debug] [ADB] Forwarding system: 42380  to device: 6790
#执行端口转发命令
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 forward tcp\:42380 tcp\:6790'
[debug] [UiAutomator2] No app capability. Assuming it is already on the device
#清理自动化留下的浅层数据
[debug] [UiAutomator2] Performing shallow cleanup of automation leftovers
#没有过期的会话
[debug] [UiAutomator2] No obsolete sessions have been detected (Error: socket hang up)
#强制停止io.appium.uiautomator2.server.test
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell am force-stop io.appium.uiautomator2.server.test'
#在模拟器/真机上开启 UIAutomator2 server
[UiAutomator2] Starting UIAutomator2 server 4.3.0
[UiAutomator2] Using UIAutomator2 server from 'C:\Users\lnz\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.3.0.apk' and test from 'C:\Users\lnz\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk'
#等待服务在线
[UiAutomator2] Waiting up to 30000ms for UiAutomator2 to be online...
#创建子进程 
[debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s","127.0.0.1:7555","shell","am","instrument","-w","io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner"]
[debug] [Instrumentation] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:
#获取状态
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:42380/wd/hub/status] with no body
[WD Proxy] Got an unexpected response with status undefined: {"code":"ECONNRESET"}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:42380/wd/hub/status] with no body
#得到响应UiAutomator2 Server is ready to accept commands"
[debug] [WD Proxy] Got response with status 200: {"sessionId":"None","value":{"ready":true,"message":"UiAutomator2 Server is ready to accept commands"}}
[debug] [UiAutomator2] The initialization of the instrumentation process took 2082ms
#转发创建session请求
[debug] [WD Proxy] Matched '/session' to command name 'createSession'
[debug] [WD Proxy] Proxying [POST /session] to [POST http://localhost:42380/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":"Android Emulator","appPackage":"com.xueqiu.android","appActivity":".view.WelcomeActivityAlias","autoGrantPermissions":true,"noReset":true,"newCommandTimeout":180,"udid":null,"systemPort":42380,"mjpegServerPort":42381},"platformName":"Android","deviceName":"127.0.0.1:7555","appPackage":"com.xueqiu.android","appActivity":".view.WelcomeActivityAlias","autoGrantPermissions":true,"noReset":true,"newCommandTimeout":180,"udid":null,"systemPort":42380,"mjpegServerPort":42381,"deviceUDID":"127.0.0.1:7555"}],"alwaysMatch":{}}}
#得到响应200
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":{"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","deviceName":"Android Emulator","appPackage":"com.xueqiu.android","appActivity":".view.WelcomeActivityAlias","autoGrantPermissions":true,"noReset":true,"newCommandTimeout":180,"udid":null,"systemPort":42380,"mjpegServerPort":42381},"platformName":"Android","deviceName":"127.0.0.1:7555","appPackage":"com.xueqiu.android","appActivity":".view.WelcomeActivityAlias","autoGrantPermissions":true,"noReset":true,"newCommandTimeout":180,"udid":null,"systemPort":42380,"mjpegServerPort":42381,"deviceUDID":"127.0.0.1:7555"}],"alwaysMatch":{}}}}
#已将下游协议确定为“W3C”
[WD Proxy] Determined the downstream protocol as 'W3C'
#获取设备信息
[debug] [WD Proxy] Proxying [GET /appium/device/info] to [GET http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/appium/device/info] with no body
#得到设备信息
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":{"androidId":"59bf40d99b8dd461","manufacturer":"Netease","model":"MuMu","brand":"Android","apiVersion":"23","platformVersion":"6.0.1","carrierName":"","realDisplaySize":"1440x810","displayDensity":270,"networks":[{"type":1,"typeName":"WIFI","subtype":0,"subtypeName":"","isConnected":true,"detailedState":"CONNECTED","state":"CONNECTED","extraInfo":"\"KjdZ6omN8\"","isAvailable":true,"isFailover":false,"isRoaming":false,"capabilities":{"transportTypes":"NET_CAPABILITY_SUPL","networkCapabilities":"","linkUpstreamBandwidthKbps":1048576,"linkDownBandwidthKbps":1048576,"signalStrength":-55,"networkSpecifier":null,"SSID":null}}],"locale":"zh_CN","timeZone":"Asia\/Shanghai"}}
#显示屏参数
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell dumpsys window'
[AndroidDriver] Screen already unlocked, doing nothing
[UiAutomator2] Starting 'com.xueqiu.android/.view.WelcomeActivityAlias and waiting for 'com.xueqiu.android/.view.WelcomeActivityAlias'
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell am start -W -n com.xueqiu.android/.view.WelcomeActivityAlias -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000'
#获取设备像素比
[debug] [WD Proxy] Proxying [GET /appium/device/pixel_ratio] to [GET http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/appium/device/pixel_ratio] with body: {}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":1.6875}
#获取设备的状态栏高度
[debug] [WD Proxy] Matched '/appium/device/system_bars' to command name 'getSystemBars'
[debug] [WD Proxy] Proxying [GET /appium/device/system_bars] to [GET http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/appium/device/system_bars] with body: {}
#获取设备尺寸
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":{"statusBar":41}}
[debug] [WD Proxy] Matched '/window/current/size' to command name 'getWindowSize'
[debug] [WD Proxy] Proxying [GET /window/current/size] to [GET http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/window/current/size] with body: {}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":{"height":1440,"width":810}}
#已成功创建新AndroidUiautomator2Driver会话,会话02fcf169-ae94-49ed-93ed-909781f1a452已添加到主会话列表
[Appium] New AndroidUiautomator2Driver session created successfully, session 02fcf169-ae94-49ed-93ed-909781f1a452 added to master session list
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1599533613897 (10:53:33 GMT+0800 (GMT+08:00))
[debug] [W3C (02fcf169)] Cached the protocol value 'W3C' for the new session 02fcf169-ae94-49ed-93ed-909781f1a452
[debug] [W3C (02fcf169)] 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":"Android Emulator","appPackage":"com.xueqiu.android","appActivity":".view.WelcomeActivityAlias","autoGrantPermissions":true,"noReset":true,"newCommandTimeout":180,"udid":null,"systemPort":42380,"mjpegServerPort":42381},"platformName":"Android","deviceName":"127.0.0.1:7555","appPackage":"com.xueqiu.android","appActivity":".view.WelcomeActivityAlias","autoGrantPermissions":true,"noReset":true,"newCommandTimeout":180,"udid":null,"systemPort":42380,"mjpegServerPort":42381,"deviceUDID":"127.0.0.1:7555","deviceApiLevel":23,"platformVersion":"6.0.1","deviceScreenSize":"1440x810","deviceScreenDensity":270,"deviceModel":"MuMu","deviceManufacturer":"Netease","pixelRatio":1.6875,"statBarHeight":41,"viewportRect":{"left":0,"top":41,"width":810,"height":1399}}}
[HTTP] <-- POST /wd/hub/session 200 13812 ms - 1079
[HTTP]
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/timeouts
[HTTP] {"implicit":10000}
[debug] [W3C (02fcf169)] Calling AppiumDriver.timeouts() with args: [null,null,null,null,10000,"02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [BaseDriver] W3C timeout argument: {"implicit":10000}}
[debug] [BaseDriver] Set implicit wait to 10000ms
[debug] [W3C (02fcf169)] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/timeouts 200 75 ms - 14
[HTTP]
#接收到请求
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element
[HTTP] {"using":"xpath","value":"//*[@resource-id='android:id/tabs']//*[@text='行情']"}
[debug] [W3C (02fcf169)] Calling AppiumDriver.findElement() with args: ["xpath","//*[@resource-id='android:id/tabs']//*[@text='行情']","02fcf169-ae94-49ed-93ed-909781f1a452"]
#此请求的有效定位器策略:xpath、id、类名、可访问性id、-android-uiautomator
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [BaseDriver] Waiting up to 10000 ms for condition
#匹配到命令
[debug] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element] with body: {"strategy":"xpath","selector":"//*[@resource-id='android:id/tabs']//*[@text='行情']","context":"","multiple":false}
#得到404
[WD Proxy] Got an unexpected response with status 404: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":{"error":"no such element","message":"An element could not be located on the page using the given search parameters","stacktrace":"io.appium.uiautomator2.common.exceptions.ElementNotFoundException: An element could not be located on the page using the given search parameters\n\tat io.appium.uiautomator2.handler.FindElement.findElement(FindElement.java:102)\n\tat io.appium.uiautomator2.handler.FindElement.safeHandle(FindElement.java:72)\n\tat io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:38)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:252)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:242)\n\tat io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat io.netty.channel.AbstractChannelHandlerCon...
[debug] [W3C] Matched W3C error code 'no such element' to NoSuchElementError
[debug] [BaseDriver] Waited for 234 ms so far
[debug] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element] with body: {"strategy":"xpath","selector":"//*[@resource-id='android:id/tabs']//*[@text='行情']","context":"","multiple":false}
[WD Proxy] Got an unexpected response with status 404: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":{"error":"no such element","message":"An element could not be located on the page using the given search parameters","stacktrace":"io.appium.uiautomator2.common.exceptions.ElementNotFoundException: An element could not be located on the page using the given search parameters\n\tat io.appium.uiautomator2.handler.FindElement.findElement(FindElement.java:102)\n\tat io.appium.uiautomator2.handler.FindElement.safeHandle(FindElement.java:72)\n\tat io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:38)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:252)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:242)\n\tat io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat io.netty.channel.AbstractChannelHandlerCon...
[debug] [W3C] Matched W3C error code 'no such element' to NoSuchElementError
[debug] [BaseDriver] Waited for 1039 ms so far
[debug] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element] with body: {"strategy":"xpath","selector":"//*[@resource-id='android:id/tabs']//*[@text='行情']","context":"","multiple":false}
[WD Proxy] Got an unexpected response with status 404: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":{"error":"no such element","message":"An element could not be located on the page using the given search parameters","stacktrace":"io.appium.uiautomator2.common.exceptions.ElementNotFoundException: An element could not be located on the page using the given search parameters\n\tat io.appium.uiautomator2.handler.FindElement.findElement(FindElement.java:102)\n\tat io.appium.uiautomator2.handler.FindElement.safeHandle(FindElement.java:72)\n\tat io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:38)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:252)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:242)\n\tat io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat io.netty.channel.AbstractChannelHandlerCon...
[debug] [W3C] Matched W3C error code 'no such element' to NoSuchElementError
[debug] [BaseDriver] Waited for 2104 ms so far
[debug] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element] with body: {"strategy":"xpath","selector":"//*[@resource-id='android:id/tabs']//*[@text='行情']","context":"","multiple":false}
[WD Proxy] Got an unexpected response with status 404: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":{"error":"no such element","message":"An element could not be located on the page using the given search parameters","stacktrace":"io.appium.uiautomator2.common.exceptions.ElementNotFoundException: An element could not be located on the page using the given search parameters\n\tat io.appium.uiautomator2.handler.FindElement.findElement(FindElement.java:102)\n\tat io.appium.uiautomator2.handler.FindElement.safeHandle(FindElement.java:72)\n\tat io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:38)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:252)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:242)\n\tat io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat io.netty.channel.AbstractChannelHandlerCon...
[debug] [W3C] Matched W3C error code 'no such element' to NoSuchElementError
[debug] [BaseDriver] Waited for 2679 ms so far
[debug] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element] with body: {"strategy":"xpath","selector":"//*[@resource-id='android:id/tabs']//*[@text='行情']","context":"","multiple":false}
[WD Proxy] Got an unexpected response with status 404: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":{"error":"no such element","message":"An element could not be located on the page using the given search parameters","stacktrace":"io.appium.uiautomator2.common.exceptions.ElementNotFoundException: An element could not be located on the page using the given search parameters\n\tat io.appium.uiautomator2.handler.FindElement.findElement(FindElement.java:102)\n\tat io.appium.uiautomator2.handler.FindElement.safeHandle(FindElement.java:72)\n\tat io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:38)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:252)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:242)\n\tat io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat io.netty.channel.AbstractChannelHandlerCon...
[debug] [W3C] Matched W3C error code 'no such element' to NoSuchElementError
[debug] [BaseDriver] Waited for 3216 ms so far
[debug] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element] with body: {"strategy":"xpath","selector":"//*[@resource-id='android:id/tabs']//*[@text='行情']","context":"","multiple":false}
[WD Proxy] Got an unexpected response with status 404: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":{"error":"no such element","message":"An element could not be located on the page using the given search parameters","stacktrace":"io.appium.uiautomator2.common.exceptions.ElementNotFoundException: An element could not be located on the page using the given search parameters\n\tat io.appium.uiautomator2.handler.FindElement.findElement(FindElement.java:102)\n\tat io.appium.uiautomator2.handler.FindElement.safeHandle(FindElement.java:72)\n\tat io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:38)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:252)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:242)\n\tat io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat io.netty.channel.AbstractChannelHandlerCon...
[debug] [W3C] Matched W3C error code 'no such element' to NoSuchElementError
[debug] [BaseDriver] Waited for 3972 ms so far
[debug] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element] with body: {"strategy":"xpath","selector":"//*[@resource-id='android:id/tabs']//*[@text='行情']","context":"","multiple":false}
[WD Proxy] Got an unexpected response with status 404: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":{"error":"no such element","message":"An element could not be located on the page using the given search parameters","stacktrace":"io.appium.uiautomator2.common.exceptions.ElementNotFoundException: An element could not be located on the page using the given search parameters\n\tat io.appium.uiautomator2.handler.FindElement.findElement(FindElement.java:102)\n\tat io.appium.uiautomator2.handler.FindElement.safeHandle(FindElement.java:72)\n\tat io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:38)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:252)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:242)\n\tat io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat io.netty.channel.AbstractChannelHandlerCon...
[debug] [W3C] Matched W3C error code 'no such element' to NoSuchElementError
[debug] [BaseDriver] Waited for 6093 ms so far
[debug] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element] with body: {"strategy":"xpath","selector":"//*[@resource-id='android:id/tabs']//*[@text='行情']","context":"","multiple":false}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":{"ELEMENT":"2432c622-fd09-4055-be56-9a899b112eec","element-6066-11e4-a52e-4f735466cecf":"2432c622-fd09-4055-be56-9a899b112eec"}}
[debug] [W3C (02fcf169)] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"2432c622-fd09-4055-be56-9a899b112eec","ELEMENT":"2432c622-fd09-4055-be56-9a899b112eec"}
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element 200 8074 ms - 137
[HTTP]
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/timeouts
[HTTP] {"implicit":10000}
[debug] [W3C (02fcf169)] Calling AppiumDriver.timeouts() with args: [null,null,null,null,10000,"02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [BaseDriver] W3C timeout argument: {"implicit":10000}}
[debug] [BaseDriver] Set implicit wait to 10000ms
[debug] [W3C (02fcf169)] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/timeouts 200 16 ms - 14
[HTTP]
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element/2432c622-fd09-4055-be56-9a899b112eec/click
[HTTP] {"id":"2432c622-fd09-4055-be56-9a899b112eec"}
[debug] [W3C (02fcf169)] Calling AppiumDriver.click() with args: ["2432c622-fd09-4055-be56-9a899b112eec","02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [WD Proxy] Matched '/element/2432c622-fd09-4055-be56-9a899b112eec/click' to command name 'click'
[debug] [WD Proxy] Proxying [POST /element/2432c622-fd09-4055-be56-9a899b112eec/click] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element/2432c622-fd09-4055-be56-9a899b112eec/click] with body: {"element":"2432c622-fd09-4055-be56-9a899b112eec"}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":null}
[debug] [W3C (02fcf169)] Responding to client with driver.click() result: null
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element/2432c622-fd09-4055-be56-9a899b112eec/click 200 32 ms - 14
[HTTP]
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element
[HTTP] {"using":"id","value":"com.xueqiu.android:id/action_search"}
[debug] [W3C (02fcf169)] Calling AppiumDriver.findElement() with args: ["id","com.xueqiu.android:id/action_search","02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [BaseDriver] Waiting up to 10000 ms for condition
[debug] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element] with body: {"strategy":"id","selector":"com.xueqiu.android:id/action_search","context":"","multiple":false}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":{"ELEMENT":"f2e0ebfe-bae6-4018-8109-dcaca1aee2b8","element-6066-11e4-a52e-4f735466cecf":"f2e0ebfe-bae6-4018-8109-dcaca1aee2b8"}}
[debug] [W3C (02fcf169)] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"f2e0ebfe-bae6-4018-8109-dcaca1aee2b8","ELEMENT":"f2e0ebfe-bae6-4018-8109-dcaca1aee2b8"}
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element 200 4552 ms - 137
[HTTP]
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/timeouts
[HTTP] {"implicit":10000}
[debug] [W3C (02fcf169)] Calling AppiumDriver.timeouts() with args: [null,null,null,null,10000,"02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [BaseDriver] W3C timeout argument: {"implicit":10000}}
[debug] [BaseDriver] Set implicit wait to 10000ms
[debug] [W3C (02fcf169)] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/timeouts 200 16 ms - 14
[HTTP]
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element/f2e0ebfe-bae6-4018-8109-dcaca1aee2b8/click
[HTTP] {"id":"f2e0ebfe-bae6-4018-8109-dcaca1aee2b8"}
[debug] [W3C (02fcf169)] Calling AppiumDriver.click() with args: ["f2e0ebfe-bae6-4018-8109-dcaca1aee2b8","02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [WD Proxy] Matched '/element/f2e0ebfe-bae6-4018-8109-dcaca1aee2b8/click' to command name 'click'
[debug] [WD Proxy] Proxying [POST /element/f2e0ebfe-bae6-4018-8109-dcaca1aee2b8/click] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element/f2e0ebfe-bae6-4018-8109-dcaca1aee2b8/click] with body: {"element":"f2e0ebfe-bae6-4018-8109-dcaca1aee2b8"}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":null}
[debug] [W3C (02fcf169)] Responding to client with driver.click() result: null
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element/f2e0ebfe-bae6-4018-8109-dcaca1aee2b8/click 200 47 ms - 14
[HTTP]
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element
[HTTP] {"using":"id","value":"com.xueqiu.android:id/search_input_text"}
[debug] [W3C (02fcf169)] Calling AppiumDriver.findElement() with args: ["id","com.xueqiu.android:id/search_input_text","02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [BaseDriver] Waiting up to 10000 ms for condition
[debug] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element] with body: {"strategy":"id","selector":"com.xueqiu.android:id/search_input_text","context":"","multiple":false}
[WD Proxy] Got an unexpected response with status 404: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":{"error":"no such element","message":"An element could not be located on the page using the given search parameters","stacktrace":"io.appium.uiautomator2.common.exceptions.ElementNotFoundException: An element could not be located on the page using the given search parameters\n\tat io.appium.uiautomator2.handler.FindElement.safeHandle(FindElement.java:78)\n\tat io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:38)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:252)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:242)\n\tat io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)\n\tat io.netty.chann...
[debug] [W3C] Matched W3C error code 'no such element' to NoSuchElementError
[debug] [BaseDriver] Waited for 373 ms so far
[debug] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element] with body: {"strategy":"id","selector":"com.xueqiu.android:id/search_input_text","context":"","multiple":false}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":{"ELEMENT":"c5254076-951e-4ef1-978b-f23fa192d4d0","element-6066-11e4-a52e-4f735466cecf":"c5254076-951e-4ef1-978b-f23fa192d4d0"}}
[debug] [W3C (02fcf169)] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"c5254076-951e-4ef1-978b-f23fa192d4d0","ELEMENT":"c5254076-951e-4ef1-978b-f23fa192d4d0"}
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element 200 1129 ms - 137
[HTTP]
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/timeouts
[HTTP] {"implicit":10000}
[debug] [W3C (02fcf169)] Calling AppiumDriver.timeouts() with args: [null,null,null,null,10000,"02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [BaseDriver] W3C timeout argument: {"implicit":10000}}
[debug] [BaseDriver] Set implicit wait to 10000ms
[debug] [W3C (02fcf169)] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/timeouts 200 17 ms - 14
[HTTP]
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element/c5254076-951e-4ef1-978b-f23fa192d4d0/value
[HTTP] {"text":"alibaba","value":["a","l","i","b","a","b","a"],"id":"c5254076-951e-4ef1-978b-f23fa192d4d0"}
[debug] [W3C (02fcf169)] Calling AppiumDriver.setValue() with args: [["a","l","i","b","a","b","a"],"c5254076-951e-4ef1-978b-f23fa192d4d0","02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [WD Proxy] Matched '/element/c5254076-951e-4ef1-978b-f23fa192d4d0/value' to command name 'setValue'
[debug] [Protocol Converter] Added 'value' property ["a","l","i","b","a","b","a"] to 'setValue' request body
[debug] [WD Proxy] Proxying [POST /element/c5254076-951e-4ef1-978b-f23fa192d4d0/value] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element/c5254076-951e-4ef1-978b-f23fa192d4d0/value] with body: {"elementId":"c5254076-951e-4ef1-978b-f23fa192d4d0","text":"alibaba","replace":false,"value":["a","l","i","b","a","b","a"]}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":null}
[debug] [W3C (02fcf169)] Responding to client with driver.setValue() result: null
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element/c5254076-951e-4ef1-978b-f23fa192d4d0/value 200 556 ms - 14
[HTTP]
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element
[HTTP] {"using":"xpath","value":"//*[@text='阿里巴巴']"}
[debug] [W3C (02fcf169)] Calling AppiumDriver.findElement() with args: ["xpath","//*[@text='阿里巴巴']","02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [BaseDriver] Waiting up to 10000 ms for condition
[debug] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element] with body: {"strategy":"xpath","selector":"//*[@text='阿里巴巴']","context":"","multiple":false}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":{"ELEMENT":"5fbc57d2-07f2-4ba8-a0ef-7fe7991db763","element-6066-11e4-a52e-4f735466cecf":"5fbc57d2-07f2-4ba8-a0ef-7fe7991db763"}}
[debug] [W3C (02fcf169)] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"5fbc57d2-07f2-4ba8-a0ef-7fe7991db763","ELEMENT":"5fbc57d2-07f2-4ba8-a0ef-7fe7991db763"}
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element 200 725 ms - 137
[HTTP]
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/timeouts
[HTTP] {"implicit":10000}
[debug] [W3C (02fcf169)] Calling AppiumDriver.timeouts() with args: [null,null,null,null,10000,"02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [BaseDriver] W3C timeout argument: {"implicit":10000}}
[debug] [BaseDriver] Set implicit wait to 10000ms
[debug] [W3C (02fcf169)] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/timeouts 200 11 ms - 14
[HTTP]
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element/5fbc57d2-07f2-4ba8-a0ef-7fe7991db763/click
[HTTP] {"id":"5fbc57d2-07f2-4ba8-a0ef-7fe7991db763"}
[debug] [W3C (02fcf169)] Calling AppiumDriver.click() with args: ["5fbc57d2-07f2-4ba8-a0ef-7fe7991db763","02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [WD Proxy] Matched '/element/5fbc57d2-07f2-4ba8-a0ef-7fe7991db763/click' to command name 'click'
[debug] [WD Proxy] Proxying [POST /element/5fbc57d2-07f2-4ba8-a0ef-7fe7991db763/click] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element/5fbc57d2-07f2-4ba8-a0ef-7fe7991db763/click] with body: {"element":"5fbc57d2-07f2-4ba8-a0ef-7fe7991db763"}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":null}
[debug] [W3C (02fcf169)] Responding to client with driver.click() result: null
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element/5fbc57d2-07f2-4ba8-a0ef-7fe7991db763/click 200 44 ms - 14
[HTTP]
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element
[HTTP] {"using":"xpath","value":"//*[@text='阿里巴巴']/../../..//*[@text='加自选']"}
[debug] [W3C (02fcf169)] Calling AppiumDriver.findElement() with args: ["xpath","//*[@text='阿里巴巴']/../../..//*[@text='加自选']","02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [BaseDriver] Waiting up to 10000 ms for condition
[debug] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element] with body: {"strategy":"xpath","selector":"//*[@text='阿里巴巴']/../../..//*[@text='加自选']","context":"","multiple":false}
[WD Proxy] Got an unexpected response with status 404: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":{"error":"no such element","message":"An element could not be located on the page using the given search parameters","stacktrace":"io.appium.uiautomator2.common.exceptions.ElementNotFoundException: An element could not be located on the page using the given search parameters\n\tat io.appium.uiautomator2.handler.FindElement.findElement(FindElement.java:102)\n\tat io.appium.uiautomator2.handler.FindElement.safeHandle(FindElement.java:72)\n\tat io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:38)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:252)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:242)\n\tat io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat io.netty.channel.AbstractChannelHandlerCon...
[debug] [W3C] Matched W3C error code 'no such element' to NoSuchElementError
[debug] [BaseDriver] Waited for 203 ms so far
[debug] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element] with body: {"strategy":"xpath","selector":"//*[@text='阿里巴巴']/../../..//*[@text='加自选']","context":"","multiple":false}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":{"ELEMENT":"429b8853-3d00-4d5d-a838-fdb414c34827","element-6066-11e4-a52e-4f735466cecf":"429b8853-3d00-4d5d-a838-fdb414c34827"}}
[debug] [W3C (02fcf169)] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"429b8853-3d00-4d5d-a838-fdb414c34827","ELEMENT":"429b8853-3d00-4d5d-a838-fdb414c34827"}
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element 200 1533 ms - 137
[HTTP]
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/timeouts
[HTTP] {"implicit":10000}
[debug] [W3C (02fcf169)] Calling AppiumDriver.timeouts() with args: [null,null,null,null,10000,"02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [BaseDriver] W3C timeout argument: {"implicit":10000}}
[debug] [BaseDriver] Set implicit wait to 10000ms
[debug] [W3C (02fcf169)] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/timeouts 200 16 ms - 14
[HTTP]
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element/429b8853-3d00-4d5d-a838-fdb414c34827/click
[HTTP] {"id":"429b8853-3d00-4d5d-a838-fdb414c34827"}
[debug] [W3C (02fcf169)] Calling AppiumDriver.click() with args: ["429b8853-3d00-4d5d-a838-fdb414c34827","02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [WD Proxy] Matched '/element/429b8853-3d00-4d5d-a838-fdb414c34827/click' to command name 'click'
[debug] [WD Proxy] Proxying [POST /element/429b8853-3d00-4d5d-a838-fdb414c34827/click] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element/429b8853-3d00-4d5d-a838-fdb414c34827/click] with body: {"element":"429b8853-3d00-4d5d-a838-fdb414c34827"}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":null}
[debug] [W3C (02fcf169)] Responding to client with driver.click() result: null
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element/429b8853-3d00-4d5d-a838-fdb414c34827/click 200 37 ms - 14
[HTTP]
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/elements
[HTTP] {"using":"xpath","value":"//*[@text='阿里巴巴']/../../..//*[@text='已添加']"}
[debug] [W3C (02fcf169)] Calling AppiumDriver.findElements() with args: ["xpath","//*[@text='阿里巴巴']/../../..//*[@text='已添加']","02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [BaseDriver] Waiting up to 10000 ms for condition
[debug] [WD Proxy] Matched '/elements' to command name 'findElements'
[debug] [WD Proxy] Proxying [POST /elements] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/elements] with body: {"strategy":"xpath","selector":"//*[@text='阿里巴巴']/../../..//*[@text='已添加']","context":"","multiple":true}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":[{"ELEMENT":"7cb8930b-f2d1-40a7-bc65-baddcedb0037","element-6066-11e4-a52e-4f735466cecf":"7cb8930b-f2d1-40a7-bc65-baddcedb0037"},{"ELEMENT":"01eed2ba-70d6-4024-a744-c6c71a820b0f","element-6066-11e4-a52e-4f735466cecf":"01eed2ba-70d6-4024-a744-c6c71a820b0f"}]}
[debug] [W3C (02fcf169)] Responding to client with driver.findElements() result: [{"element-6066-11e4-a52e-4f735466cecf":"7cb8930b-f2d1-40a7-bc65-baddcedb0037","ELEMENT":"7cb8930b-f2d1-40a7-bc65-baddcedb0037"},{"element-6066-11e4-a52e-4f735466cecf":"01eed2ba-70d6-4024-a744-c6c71a820b0f","ELEMENT":"01eed2ba-70d6-4024-a744-c6c71a820b0f"}]
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/elements 200 999 ms - 267
[HTTP]
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/timeouts
[HTTP] {"implicit":10000}
[debug] [W3C (02fcf169)] Calling AppiumDriver.timeouts() with args: [null,null,null,null,10000,"02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [BaseDriver] W3C timeout argument: {"implicit":10000}}
[debug] [BaseDriver] Set implicit wait to 10000ms
[debug] [W3C (02fcf169)] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/timeouts 200 14 ms - 14
[HTTP]
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element
[HTTP] {"using":"xpath","value":"//*[@text='阿里巴巴']/../../..//*[@text='已添加']"}
[debug] [W3C (02fcf169)] Calling AppiumDriver.findElement() with args: ["xpath","//*[@text='阿里巴巴']/../../..//*[@text='已添加']","02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [BaseDriver] Waiting up to 10000 ms for condition
[debug] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element] with body: {"strategy":"xpath","selector":"//*[@text='阿里巴巴']/../../..//*[@text='已添加']","context":"","multiple":false}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":{"ELEMENT":"a4d6ea14-a0d0-4cac-aaa9-780dfb7c5f81","element-6066-11e4-a52e-4f735466cecf":"a4d6ea14-a0d0-4cac-aaa9-780dfb7c5f81"}}
[debug] [W3C (02fcf169)] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"a4d6ea14-a0d0-4cac-aaa9-780dfb7c5f81","ELEMENT":"a4d6ea14-a0d0-4cac-aaa9-780dfb7c5f81"}
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element 200 255 ms - 137
[HTTP]
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/timeouts
[HTTP] {"implicit":10000}
[debug] [W3C (02fcf169)] Calling AppiumDriver.timeouts() with args: [null,null,null,null,10000,"02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [BaseDriver] W3C timeout argument: {"implicit":10000}}
[debug] [BaseDriver] Set implicit wait to 10000ms
[debug] [W3C (02fcf169)] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/timeouts 200 17 ms - 14
[HTTP]
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element/a4d6ea14-a0d0-4cac-aaa9-780dfb7c5f81/click
[HTTP] {"id":"a4d6ea14-a0d0-4cac-aaa9-780dfb7c5f81"}
[debug] [W3C (02fcf169)] Calling AppiumDriver.click() with args: ["a4d6ea14-a0d0-4cac-aaa9-780dfb7c5f81","02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [WD Proxy] Matched '/element/a4d6ea14-a0d0-4cac-aaa9-780dfb7c5f81/click' to command name 'click'
[debug] [WD Proxy] Proxying [POST /element/a4d6ea14-a0d0-4cac-aaa9-780dfb7c5f81/click] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element/a4d6ea14-a0d0-4cac-aaa9-780dfb7c5f81/click] with body: {"element":"a4d6ea14-a0d0-4cac-aaa9-780dfb7c5f81"}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":null}
[debug] [W3C (02fcf169)] Responding to client with driver.click() result: null
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element/a4d6ea14-a0d0-4cac-aaa9-780dfb7c5f81/click 200 40 ms - 14
[HTTP]
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element
[HTTP] {"using":"id","value":"com.xueqiu.android:id/action_close"}
[debug] [W3C (02fcf169)] Calling AppiumDriver.findElement() with args: ["id","com.xueqiu.android:id/action_close","02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [BaseDriver] Waiting up to 10000 ms for condition
[debug] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element] with body: {"strategy":"id","selector":"com.xueqiu.android:id/action_close","context":"","multiple":false}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":{"ELEMENT":"1a9b48d7-6ee6-4f65-8adc-dde276d55500","element-6066-11e4-a52e-4f735466cecf":"1a9b48d7-6ee6-4f65-8adc-dde276d55500"}}
[debug] [W3C (02fcf169)] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"1a9b48d7-6ee6-4f65-8adc-dde276d55500","ELEMENT":"1a9b48d7-6ee6-4f65-8adc-dde276d55500"}
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element 200 657 ms - 137
[HTTP]
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/timeouts
[HTTP] {"implicit":10000}
[debug] [W3C (02fcf169)] Calling AppiumDriver.timeouts() with args: [null,null,null,null,10000,"02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [BaseDriver] W3C timeout argument: {"implicit":10000}}
[debug] [BaseDriver] Set implicit wait to 10000ms
[debug] [W3C (02fcf169)] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/timeouts 200 26 ms - 14
[HTTP]
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element/1a9b48d7-6ee6-4f65-8adc-dde276d55500/click
[HTTP] {"id":"1a9b48d7-6ee6-4f65-8adc-dde276d55500"}
[debug] [W3C (02fcf169)] Calling AppiumDriver.click() with args: ["1a9b48d7-6ee6-4f65-8adc-dde276d55500","02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [WD Proxy] Matched '/element/1a9b48d7-6ee6-4f65-8adc-dde276d55500/click' to command name 'click'
[debug] [WD Proxy] Proxying [POST /element/1a9b48d7-6ee6-4f65-8adc-dde276d55500/click] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element/1a9b48d7-6ee6-4f65-8adc-dde276d55500/click] with body: {"element":"1a9b48d7-6ee6-4f65-8adc-dde276d55500"}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":null}
[debug] [W3C (02fcf169)] Responding to client with driver.click() result: null
#返回响应
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element/1a9b48d7-6ee6-4f65-8adc-dde276d55500/click 200 52 ms - 14
[HTTP]
#接收到删除session请求
[HTTP] --> DELETE /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452
[HTTP] {}
[debug] [W3C (02fcf169)] Calling AppiumDriver.deleteSession() with args: ["02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [BaseDriver] Event 'quitSessionRequested' logged at 1599533633708 (10:53:53 GMT+0800 (GMT+08:00))
#删除appium创建的session
[Appium] Removing session 02fcf169-ae94-49ed-93ed-909781f1a452 from our master session list
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [UiAutomator2] Deleting UiAutomator2 server session
[debug] [WD Proxy] Matched '/' to command name 'deleteSession'
#删除UiAutomator2 server 上的session
[debug] [WD Proxy] Proxying [DELETE /] to [DELETE http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408] with no body
#删除成功
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":null}
#强制停止被测应用
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell am force-stop com.xueqiu.android'
[debug] [Instrumentation] .
[debug] [Instrumentation] Time: 24.053
[debug] [Instrumentation]
[debug] [Instrumentation] OK (1 test)
#停止日志捕获
[debug] [Logcat] Stopping logcat capture
[debug] [Instrumentation] The process has exited with code 0
[debug] [ADB] Removing forwarded port socket connection: 42380
#移除已转发的端口
[debug] [ADB] Running 'D:\Program Files (x86)\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 forward --remove tcp\:42380'
[debug] [BaseDriver] Event 'quitSessionFinished' logged at 1599533634855 (10:53:54 GMT+0800 (GMT+08:00))
[debug] [W3C (02fcf169)] Received response: null
[debug] [W3C (02fcf169)] But deleting session, so not returning
[debug] [W3C (02fcf169)] Responding to client with driver.deleteSession() result: null
[HTTP] <-- DELETE /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452 200 1171 ms - 14
[HTTP]

日志中用到的adb命令汇总

adb.exe -P 5037 -s 127.0.0.1:7555 shell getprop ro.build.version.sdk	#获取sdk版本
adb.exe -P 5037 -s 127.0.0.1:7555 wait-for-device	#等待设备
adb.exe -P 5037 -s 127.0.0.1:7555 shell echo ping	#ping
adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys package io.appium.settings	#获取包信息,日志中主要用查看包是否安装
adb.exe -P 5037 -s 127.0.0.1:7555 shell 'ls -t -1 /data/local/tmp/appium_cache 2>&1	
adb.exe -P 5037 -s 127.0.0.1:7555 shell 'pgrep --help; echo $?	
adb.exe -P 5037 -s 127.0.0.1:7555 shell pgrep -f io\.appium\.settings	#查找io\.appium\.settings 的进程id
adb.exe -P 5037 -s 127.0.0.1:7555 shell pm grant io.appium.settings android.permission.SET_ANIMATION_SCALE ; pm grant io.appium.settings android.permission.CHANGE_CONFIGURATION ; pm grant io.appium.settings android.permission.ACCESS_FINE_LOCATION \	#授权
adb.exe -P 5037 -s 127.0.0.1:7555 shell am start -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER	#启动io.appium.settings
adb.exe -P 5037 -s 127.0.0.1:7555 shell appops set io.appium.settings android:mock_location allow	#设置位置允许
adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys package io.appium.uiautomator2.server	#获取包信息,日志中主要用查看包是否安装
adb.exe -P 5037 -s 127.0.0.1:7555 shell pm list instrumentation	#列出测试包
adb.exe -P 5037 -s 127.0.0.1:7555 forward tcp:42380 tcp:6790	#转发端口
Creating ADB subprocess with args: ["-P",5037,"-s",“127.0.0.1:7555”,“shell”,“am”,“instrument”,"-w",“io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner”]	#创建进程

日志中session的创建、加入、运用、删除解析

一共创建了2个sessionid,分别是appium服务创建的sessionid、AndroidUiautomator2Driver创建sessionid

创建sessionid

#这个是appium 服务 AndroidUiautomator2Driver 创建的sessionid的日志过程
[Appium] Appium v1.15.1 creating new AndroidUiautomator2Driver (v1.37.2) session
[debug] [BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[debug] [BaseDriver] Creating session with W3C capabilities: {
[debug] [BaseDriver]   "alwaysMatch": {
[debug] [BaseDriver]     "platformName": "Android",
[debug] [BaseDriver]     "appium:deviceName": "Android Emulator",
[debug] [BaseDriver]     "appium:appPackage": "com.xueqiu.android",
[debug] [BaseDriver]     "appium:appActivity": ".view.WelcomeActivityAlias",
[debug] [BaseDriver]     "appium:autoGrantPermissions": "true",
[debug] [BaseDriver]     "appium:noReset": "true",
[debug] [BaseDriver]     "appium:newCommandTimeout": "180",
[debug] [BaseDriver]     "appium:udid": null,
[debug] [BaseDriver]     "appium:systemPort": 42380,
[debug] [BaseDriver]     "appium:mjpegServerPort": 42381
[debug] [BaseDriver]   },
[debug] [BaseDriver]   "firstMatch": [
[debug] [BaseDriver]     {}
[debug] [BaseDriver]   ]
[debug] [BaseDriver] }
[BaseDriver] Number capability passed in as string. Functionality may be compromised.
[BaseDriver] Capability 'noReset' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Capability 'autoGrantPermissions' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Capability 'newCommandTimeout' changed from string ('180') to integer (180). This may cause unexpected behavior
[BaseDriver] The following capabilities were provided, but are not recognized by Appium:
[BaseDriver]   mjpegServerPort
[BaseDriver] Session created with session id: 02fcf169-ae94-49ed-93ed-909781f1a452

#这个是创建 UiAutomator2 server session 的过程
[debug] [UiAutomator2] The initialization of the instrumentation process took 2082ms
[debug] [WD Proxy] Matched '/session' to command name 'createSession'
[debug] [WD Proxy] Proxying [POST /session] to [POST http://localhost:42380/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":"Android Emulator","appPackage":"com.xueqiu.android","appActivity":".view.WelcomeActivityAlias","autoGrantPermissions":true,"noReset":true,"newCommandTimeout":180,"udid":null,"systemPort":42380,"mjpegServerPort":42381},"platformName":"Android","deviceName":"127.0.0.1:7555","appPackage":"com.xueqiu.android","appActivity":".view.WelcomeActivityAlias","autoGrantPermissions":true,"noReset":true,"newCommandTimeout":180,"udid":null,"systemPort":42380,"mjpegServerPort":42381,"deviceUDID":"127.0.0.1:7555"}],"alwaysMatch":{}}}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":{"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","deviceName":"Android Emulator","appPackage":"com.xueqiu.android","appActivity":".view.WelcomeActivityAlias","autoGrantPermissions":true,"noReset":true,"newCommandTimeout":180,"udid":null,"systemPort":42380,"mjpegServerPort":42381},"platformName":"Android","deviceName":"127.0.0.1:7555","appPackage":"com.xueqiu.android","appActivity":".view.WelcomeActivityAlias","autoGrantPermissions":true,"noReset":true,"newCommandTimeout":180,"udid":null,"systemPort":42380,"mjpegServerPort":42381,"deviceUDID":"127.0.0.1:7555"}],"alwaysMatch":{}}}}

加入sessionid到列表中

#把appium创建的session id 加入到主要的session 列表中
[Appium] New AndroidUiautomator2Driver session created successfully, session 02fcf169-ae94-49ed-93ed-909781f1a452 added to master session list

运用

[HTTP]
#接收请求,携带了appium 的sessionid 02fcf169-ae94-49ed-93ed-909781f1a452
[HTTP] --> POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element/2432c622-fd09-4055-be56-9a899b112eec/click
[HTTP] {"id":"2432c622-fd09-4055-be56-9a899b112eec"}
[debug] [W3C (02fcf169)] Calling AppiumDriver.click() with args: ["2432c622-fd09-4055-be56-9a899b112eec","02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [WD Proxy] Matched '/element/2432c622-fd09-4055-be56-9a899b112eec/click' to command name 'click'
#转发请求。使用UIautomator server 产生的sessionid 
[debug] [WD Proxy] Proxying [POST /element/2432c622-fd09-4055-be56-9a899b112eec/click] to [POST http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408/element/2432c622-fd09-4055-be56-9a899b112eec/click] with body: {"element":"2432c622-fd09-4055-be56-9a899b112eec"}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":null}
[debug] [W3C (02fcf169)] Responding to client with driver.click() result: null
[HTTP] <-- POST /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452/element/2432c622-fd09-4055-be56-9a899b112eec/click 200 32 ms - 14

删除sessionid

#删除seesionid 过程
[HTTP] --> DELETE /wd/hub/session/02fcf169-ae94-49ed-93ed-909781f1a452
[HTTP] {}
[debug] [W3C (02fcf169)] Calling AppiumDriver.deleteSession() with args: ["02fcf169-ae94-49ed-93ed-909781f1a452"]
[debug] [BaseDriver] Event 'quitSessionRequested' logged at 1599533633708 (10:53:53 GMT+0800 (GMT+08:00))
#删除appium 的sessionid
[Appium] Removing session 02fcf169-ae94-49ed-93ed-909781f1a452 from our master session list
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [UiAutomator2] Deleting UiAutomator2 server session
[debug] [WD Proxy] Matched '/' to command name 'deleteSession'
#删除Uiautomator server 产生 的sessionid
[debug] [WD Proxy] Proxying [DELETE /] to [DELETE http://localhost:42380/wd/hub/session/66df70fc-d5be-4c84-9ad9-f11b0fd3e408] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"66df70fc-d5be-4c84-9ad9-f11b0fd3e408","value":null}

注意:[WD Proxy] 这个标识其实是 appium-uiautomator2-server打印出的日志

posted @ 2022-08-11 22:48  我是小菜鸡丫丫  阅读(741)  评论(0编辑  收藏  举报