appium 3-31603调试分析方法

Appium Log

清晰记录了所有的请求和结果
[Appium] Welcome to Appium v1.8.1
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
#启动appium
//启动appium
<font color=#FF0000>启动</font>
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"appActivity":".view.WelcomeActivityAlias","appPackage":"com.xueqiu.android","noReset":true,"newCommandTimeout":1200,"automationName":"UiAutomator2","platformName":"Android","deviceName":"domo"},"capabilities":{"alwaysMatch":{"appium:appActivity":".view.WelcomeActivityAlias","appium:appPackage":"com.xueqiu.android","appium:automationName":"UiAutomator2","appium:deviceName":"domo","appium:newCommandTimeout":1200,"appium:noReset":true,"platformName":"android"},"firstMatch":[{}]}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"appActivity":".view.WelcomeActivityAlias","appPackage":"com.xueqiu.android","noReset":true,"newCommandTimeout":1200,"automationName":"UiAutomator2","platformName":"Android","deviceName":"domo"},null,{"alwaysMatch":{"appium:appActivity":".view.WelcomeActivityAlias","appium:appPackage":"com.xueqiu.android","appium:automationName":"UiAutomator2","appium:deviceName":"domo","appium:newCommandTimeout":1200,"appium:noReset":true,"platformName":"android"},"firstMatch":[{}]}]
[debug] [BaseDriver] Event ‘newSessionRequested‘ logged at 1538809529667 (15:05:29 GMT+0800 (CST))
[Appium] Creating new AndroidUiautomator2Driver (v1.12.0) session
[Appium] Capabilities:
[Appium]   platformName: android
[Appium]   appActivity: .view.WelcomeActivityAlias
[Appium]   appPackage: com.xueqiu.android
[Appium]   automationName: UiAutomator2
[Appium]   deviceName: domo
[Appium]   newCommandTimeout: 1200
[Appium]   noReset: true
[debug] [BaseDriver] W3C capabilities {"alwaysMatch":{"platformNa... and MJSONWP desired capabilities [object Object] were provided
[debug] [BaseDriver] Creating session with W3C capabilities: {"alwaysMatch":{"platformNa...
[BaseDriver] Session created with session id: 0bc0f9ca-b2fc-43d1-91a2-c7525ed848d0
[debug] [AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_131
[ADB] Checking whether adb is present
[ADB] Found 2 ‘build-tools‘ folders under ‘/Users/chenshanju/Library/Android/sdk‘ (newest first):
[ADB]     /Users/chenshanju/Library/Android/sdk/build-tools/28.0.2
[ADB]     /Users/chenshanju/Library/Android/sdk/build-tools/26.0.0
[ADB] Using adb from /Users/chenshanju/Library/Android/sdk/platform-tools/adb
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[AndroidDriver] Using device: 406e8f3
[debug] [ADB] Setting device id to 406e8f3
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell getprop ro.build.version.sdk‘
[debug] [ADB] Current device property ‘ro.build.version.sdk‘: 27
[debug] [ADB] Device API level: 27
[AndroidDriver] No app sent in, not parsing package/activity
[ADB] Getting device platform version
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell getprop ro.build.version.release‘
[debug] [ADB] Current device property ‘ro.build.version.release‘: 8.1.0
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell wm size‘
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell wm density‘
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell getprop ro.product.model‘
[debug] [ADB] Current device property ‘ro.product.model‘: Redmi Note 5
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell getprop ro.product.manufacturer‘
[debug] [ADB] Current device property ‘ro.product.manufacturer‘: Xiaomi
[debug] [ADB] Device API level: 27
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell am force-stop io.appium.uiautomator2.server‘
[debug] [ADB] Checking app cert for /usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk
[ADB] Using apksigner from /Users/chenshanju/Library/Android/sdk/build-tools/28.0.2/apksigner
[debug] [ADB] Starting ‘/Users/chenshanju/Library/Android/sdk/build-tools/28.0.2/apksigner‘ with args ‘verify,--print-certs,/usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk‘
[debug] [ADB] ‘/usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk‘ is already signed.
[debug] [ADB] Checking app cert for /usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk
[debug] [ADB] Starting ‘/Users/chenshanju/Library/Android/sdk/build-tools/28.0.2/apksigner‘ with args ‘verify,--print-certs,/usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk‘
[debug] [ADB] ‘/usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk‘ is already signed.
[debug] [ADB] Getting install status for io.appium.uiautomator2.server
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell pm list packages io.appium.uiautomator2.server‘
[debug] [ADB] App is installed
[debug] [ADB] Getting package info for ‘io.appium.uiautomator2.server‘
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell dumpsys package io.appium.uiautomator2.server‘
[ADB] Checking whether aapt is present
[ADB] Using aapt from /Users/chenshanju/Library/Android/sdk/build-tools/28.0.2/aapt
[debug] [ADB] The installed ‘io.appium.uiautomator2.server‘ package does not require upgrade (‘1.12.0‘ >= ‘1.12.0‘)
[debug] [ADB] Getting install status for io.appium.uiautomator2.server.test
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell pm list packages io.appium.uiautomator2.server.test‘
[debug] [ADB] App is installed
[debug] [ADB] Getting package info for ‘io.appium.uiautomator2.server.test‘
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell dumpsys package io.appium.uiautomator2.server.test‘
[ADB] Cannot read version codes of ‘/usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk‘ and/or ‘io.appium.uiautomator2.server.test‘
[ADB] Cannot read version names of ‘/usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk‘ and/or ‘io.appium.uiautomator2.server.test‘. Assuming correct app version is already installed
[debug] [UiAutomator2] Waiting up to 20000ms for instrumentation ‘io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner‘ to be available
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell pm list instrumentation‘
[debug] [UiAutomator2] Instrumentation ‘io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner‘ available
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 wait-for-device‘
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell echo ping‘
[debug] [AndroidDriver] Pushing settings apk to device...
[debug] [ADB] Getting install status for io.appium.settings
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell pm list packages io.appium.settings‘
[debug] [ADB] App is installed
[debug] [ADB] Getting package info for ‘io.appium.settings‘
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell dumpsys package io.appium.settings‘
[debug] [ADB] The installed ‘io.appium.settings‘ package does not require upgrade (‘2.3.0‘ >= ‘2.3.0‘)
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell ps‘
[debug] [ADB] Device API level: 27
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell am start -W -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000‘
[debug] [ADB] Device API level: 27
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell appops set io.appium.settings android\:mock_location allow‘
[AndroidDriver] setDeviceLanguageCountry requires language or country.
[AndroidDriver] Got language: ‘null‘ and country: ‘null‘
[debug] [Logcat] Starting logcat capture
[debug] [AndroidDriver] Pushing unlock helper app to device...
[debug] [ADB] Getting install status for io.appium.unlock
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell pm list packages io.appium.unlock‘
[debug] [ADB] App is installed
[debug] [ADB] Getting package info for ‘io.appium.unlock‘
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell dumpsys package io.appium.unlock‘
[debug] [ADB] The installed ‘io.appium.unlock‘ package does not require upgrade (‘2.0.0‘ >= ‘2.0.0‘)
[debug] [UiAutomator2] Forwarding UiAutomator2 Server port 6790 to 8200
[debug] [ADB] Forwarding system: 8200 to device: 6790
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 forward tcp\:8200 tcp\:6790‘
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell rm -rf /data/local/tmp/strings.json‘
[debug] [UiAutomator2] No app capability. Assuming it is already on the device
[debug] [ADB] Checking app cert for null
[debug] [ADB] ‘null‘ doesn‘t exist
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell am force-stop io.appium.uiautomator2.server‘
[UiAutomator2] Starting uiautomator2 server 1.12.0
[UiAutomator2] Using UIAutomator2 server from ‘/usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk‘ and test from ‘/usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk‘
[UiAutomator2] Running command: ‘adb -s 406e8f3 shell am instrument -w io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner‘
[UiAutomator2] Waiting up to 20000ms for UiAutomator2 to be online...
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"SESSIONID\",\"status\":0,\"value\":\"Status Invoked\"}"
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8200/wd/hub/session] with body: {"desiredCapabilities":{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","appActivity":".view.WelcomeActivityAlias","appPackage":"com.xueqiu.android","automationName":"UiAutomator2","deviceName":"domo","newCommandTimeout":1200,"noReset":true},"platformName":"android","appActivity":".view.WelcomeActivityAlias","appPackage":"com.xueqiu.android","automationName":"UiAutomator2","deviceName":"406e8f3","newCommandTimeout":1200,"noReset":true,"deviceUDID":"406e8f3","platformVersion":"8.1.0","deviceScreenSize":"1080x2160","deviceScreenDensity":440,"deviceModel":"Redmi Note 5","deviceManufacturer":"Xiaomi","deviceApiLevel":27}}
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"ae8224b2-a988-4479-8368-bd26ff5ca991","status":0,"value":"Created Session"}
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell dumpsys window‘
[AndroidDriver] Screen already unlocked, doing nothing
[UiAutomator2] UiAutomator2 did not start the activity we were waiting for, ‘com.xueqiu.android/.view.WelcomeActivityAlias‘. Starting it ourselves
[debug] [ADB] Device API level: 27
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell am start -W -n com.xueqiu.android/.view.WelcomeActivityAlias -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000‘
[debug] [JSONWP Proxy] Proxying [GET /appium/device/pixel_ratio] to [GET http://localhost:8200/wd/hub/session/ae8224b2-a988-4479-8368-bd26ff5ca991/appium/device/pixel_ratio] with body: {}
[debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"ae8224b2-a988-4479-8368-bd26ff5ca991\",\"status\":0,\"value\":2.75}"
[debug] [JSONWP Proxy] Proxying [GET /appium/device/system_bars] to [GET http://localhost:8200/wd/hub/session/ae8224b2-a988-4479-8368-bd26ff5ca991/appium/device/system_bars] with body: {}
[debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"ae8224b2-a988-4479-8368-bd26ff5ca991\",\"status\":0,\"value\":{\"statusBar\":66}}"
[debug] [JSONWP Proxy] Proxying [GET /window/current/size] to [GET http://localhost:8200/wd/hub/session/ae8224b2-a988-4479-8368-bd26ff5ca991/window/current/size] with body: {}
[debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"ae8224b2-a988-4479-8368-bd26ff5ca991\",\"status\":0,\"value\":{\"height\":2030,\"width\":1080}}"
[Appium] New AndroidUiautomator2Driver session created successfully, session 0bc0f9ca-b2fc-43d1-91a2-c7525ed848d0 added to master session list
[debug] [BaseDriver] Event ‘newSessionStarted‘ logged at 1538809542214 (15:05:42 GMT+0800 (CST))
[debug] [W3C] 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","appActivity":".view.WelcomeActivityAlias","appPackage":"com.xueqiu.android","automationName":"UiAutomator2","deviceName":"domo","newCommandTimeout":1200,"noReset":true},"platformName":"android","appActivity":".view.WelcomeActivityAlias","appPackage":"com.xueqiu.android","automationName":"UiAutomator2","deviceName":"406e8f3","newCommandTimeout":1200,"noReset":true,"deviceUDID":"406e8f3","platformVersion":"8.1.0","deviceScreenSize":"1080x2160","deviceScreenDensity":440,"deviceModel":"Redmi Note 5","deviceManufacturer":"Xiaomi","deviceApiLevel":27,"pixelRatio":2.75,"statBarHeight":66,"viewportRect":{"left":0,"top":66,"width":1080,"height":1964}}}
[HTTP] <-- POST /wd/hub/session 200 12555 ms - 960
[HTTP]
[HTTP] --> GET /wd/hub/session/0bc0f9ca-b2fc-43d1-91a2-c7525ed848d0
[HTTP] {}
[debug] [W3C] Calling AppiumDriver.getSession() with args: ["0bc0f9ca-b2fc-43d1-91a2-c7525ed848d0"]
[debug] [UiAutomator2] Getting session details from server to mix in
[debug] [JSONWP Proxy] Proxying [GET /] to [GET http://localhost:8200/wd/hub/session/ae8224b2-a988-4479-8368-bd26ff5ca991] with body: {}
[debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"ae8224b2-a988-4479-8368-bd26ff5ca991\",\"status\":0,\"value\":{}}"
[debug] [W3C] Responding to client with driver.getSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","appActivity":".view.WelcomeActivityAlias","appPackage":"com.xueqiu.android","automationName":"UiAutomator2","deviceName":"domo","newCommandTimeout":1200,"noReset":true},"platformName":"android","appActivity":".view.WelcomeActivityAlias","appPackage":"com.xueqiu.android","automationName":"UiAutomator2","deviceName":"406e8f3","newCommandTimeout":1200,"noReset":true,"deviceUDID":"406e8f3","platformVersion":"8.1.0","deviceScreenSize":"1080x2160","deviceScreenDensity":440,"deviceModel":"Redmi Note 5","deviceManufacturer":"Xiaomi","deviceApiLevel":27,"pixelRatio":2.75,"statBarHeight":66,"viewportRect":{"left":0,"top":66,"width":1080,"height":1964}}
[HTTP] <-- GET /wd/hub/session/0bc0f9ca-b2fc-43d1-91a2-c7525ed848d0 200 35 ms - 892
[HTTP]
[HTTP] --> GET /wd/hub/session/0bc0f9ca-b2fc-43d1-91a2-c7525ed848d0
[HTTP] {}
[debug] [W3C] Calling AppiumDriver.getSession() with args: ["0bc0f9ca-b2fc-43d1-91a2-c7525ed848d0"]
[debug] [UiAutomator2] Getting session details from server to mix in
[debug] [JSONWP Proxy] Proxying [GET /] to [GET http://localhost:8200/wd/hub/session/ae8224b2-a988-4479-8368-bd26ff5ca991] with body: {}
[debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"ae8224b2-a988-4479-8368-bd26ff5ca991\",\"status\":0,\"value\":{}}"
[debug] [W3C] Responding to client with driver.getSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","appActivity":".view.WelcomeActivityAlias","appPackage":"com.xueqiu.android","automationName":"UiAutomator2","deviceName":"domo","newCommandTimeout":1200,"noReset":true},"platformName":"android","appActivity":".view.WelcomeActivityAlias","appPackage":"com.xueqiu.android","automationName":"UiAutomator2","deviceName":"406e8f3","newCommandTimeout":1200,"noReset":true,"deviceUDID":"406e8f3","platformVersion":"8.1.0","deviceScreenSize":"1080x2160","deviceScreenDensity":440,"deviceModel":"Redmi Note 5","deviceManufacturer":"Xiaomi","deviceApiLevel":27,"pixelRatio":2.75,"statBarHeight":66,"viewportRect":{"left":0,"top":66,"width":1080,"height":1964}}
[HTTP] <-- GET /wd/hub/session/0bc0f9ca-b2fc-43d1-91a2-c7525ed848d0 200 21 ms - 892
[HTTP]
[HTTP] --> POST /wd/hub/session/0bc0f9ca-b2fc-43d1-91a2-c7525ed848d0/timeouts
[HTTP] {"implicit":20000}
[debug] [W3C] Calling AppiumDriver.timeouts() with args: [{"protocol":"W3C","implicit":20000},"0bc0f9ca-b2fc-43d1-91a2-c7525ed848d0"]
[debug] [BaseDriver] script: undefined, pageLoad: undefined, implicit: 20000
[debug] [BaseDriver] Set implicit wait to 20000ms
[debug] [W3C] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/0bc0f9ca-b2fc-43d1-91a2-c7525ed848d0/timeouts 200 5 ms - 14
[HTTP]
[HTTP] --> POST /wd/hub/session/0bc0f9ca-b2fc-43d1-91a2-c7525ed848d0/element
[HTTP] {"using":"xpath","value":"//*[@text=\"允许\"]"}
[debug] [W3C] Calling AppiumDriver.findElement() with args: ["xpath","//*[@text=\"允许\"]","0bc0f9ca-b2fc-43d1-91a2-c7525ed848d0"]
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [BaseDriver] Waiting up to 20000 ms for condition
[debug] [JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8200/wd/hub/session/ae8224b2-a988-4479-8368-bd26ff5ca991/element] with body: {"strategy":"xpath","selector":"//*[@text=\"允许\"]","context":"","multiple":false}
[W3C] Encountered internal error running command:  {"w3cStatus":400,"jsonwp":{"sessionId":"ae8224b2-a988-4479-8368-bd26ff5ca991","status":7,"value":"An element could not be located on the page using the given search parameters."}} ProxyRequestError: Could not proxy command to remote server. Original error: 500 - {"sessionId":"ae8224b2-a988-4479-8368-bd26ff5ca991","status":7,"value":"An element could not be located on the page using the given search parameters."}
[W3C]     at JWProxy.proxy$ (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:152:13)
[W3C]     at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[W3C]     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[W3C]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[W3C]     at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[W3C]     at <anonymous>
[debug] [MJSONWP] Matched JSONWP error code 7 to NoSuchElementError
[HTTP] <-- POST /wd/hub/session/0bc0f9ca-b2fc-43d1-91a2-c7525ed848d0/element 404 2481 ms - 1224
[HTTP]
[HTTP] --> DELETE /wd/hub/session/0bc0f9ca-b2fc-43d1-91a2-c7525ed848d0
[HTTP] {}
[debug] [W3C] Calling AppiumDriver.deleteSession() with args: ["0bc0f9ca-b2fc-43d1-91a2-c7525ed848d0"]
[debug] [BaseDriver] Event ‘quitSessionRequested‘ logged at 1538809549875 (15:05:49 GMT+0800 (CST))
[Appium] Removing session 0bc0f9ca-b2fc-43d1-91a2-c7525ed848d0 from our master session list
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [UiAutomator2] Deleting UiAutomator2 server session
[debug] [JSONWP Proxy] Proxying [DELETE /] to [DELETE http://localhost:8200/wd/hub/session/ae8224b2-a988-4479-8368-bd26ff5ca991] with no body
[debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"ae8224b2-a988-4479-8368-bd26ff5ca991\",\"status\":0,\"value\":\"Session deleted\"}"
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 shell am force-stop com.xueqiu.android‘
[debug] [Logcat] Stopping logcat capture
[debug] [ADB] Removing forwarded port socket connection: 8200
[debug] [ADB] Running ‘/Users/chenshanju/Library/Android/sdk/platform-tools/adb -P 5037 -s 406e8f3 forward --remove tcp\:8200‘
[debug] [BaseDriver] Event ‘quitSessionFinished‘ logged at 1538809550075 (15:05:50 GMT+0800 (CST))
[debug] [W3C] Received response: null
[debug] [W3C] But deleting session, so not returning
[debug] [W3C] Responding to client with driver.deleteSession() result: null
[HTTP] <-- DELETE /wd/hub/session/0bc0f9ca-b2fc-43d1-91a2-c7525ed848d0 200 202 ms - 14
[HTTP]
[debug] [UiAutomator2] [UIAutomator2] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:.
[debug] [UiAutomator2] [UIAutomator2] Time: 11.084
[debug] [UiAutomator2] [UIAutomator2] OK (1 test)

getPageSource

界面的完成dom结构.xml文件

脚本内调试

利用xpath获取所有匹配的元素
driver.findElementByXpath("//*")

原文地址:https://www.cnblogs.com/csj2018/p/9747493.html

时间: 2024-11-01 14:40:33

appium 3-31603调试分析方法的相关文章

程序员突围-程序调试分析(序)

-从实践到思考,痛苦的煎熬 其实算算,工作一年了,从大学毕业至今,接触编程已经五年了,但是真正的编程感觉还没有开始,从大一开始接触C语言,陆续接触c++,java,C#等等,现在感悟到了一点,编程语言学那么多有什么用呢?其实把一门编程语言学精了,学透了,其他的是触类旁通的(底层的C语言和C++可能有点例外),下面我会说一下我的经历,我感觉可能是大多数学习编程人的必经的阶段,让大家对编程的抵触少一些,然后想想一个我这样的白痴都能慢慢的开始程序调试,程序分析,你们绝对比我强的,下篇文章才会进入我的程

程序员突围-程序调试分析(一) 我从菜鸟进化的感悟

程序员突围-程序调试分析(一) 我从菜鸟进化的感悟 在说程序调试分析之前,我们还是了解一些基本的概念性的东西(在下现在从事java,因而都已java为例) 1. bug的分类 根据程序的阶段和MSDN和看过的一些书籍的分析,bug分为编译错误,运行时错误和逻辑的错误 (1)  编译错误 一般初学者犯错比较多的地方,编译错误,说白了就是程序在从java编译成.class文件时出现了问题,这个问题的现象比较明显,比如说语句写的有问题,那么对于这类问题的解决方法是什么呢,翻翻书,翻翻API(翻阅API

白屏调试分析

前些天在展讯8825上调试一个ili9807的屏,屏幕一直显示为白屏,这就非常麻烦了,因为白屏意味着基本的显示也没有, 调试屏的时候,即使是显示花屏或者任何的乱彩色线条,甚至是简单的几条线,也算是成功了一小部分,能显示数据, 意味着基本的数据链路是联通的. 开始是从屏的连接器上找问题,从硬件上测量FPC是正常连接的,简单的就是测量屏与主板的各个引脚是连接通的, 各引脚上的电压是正常的,各引脚是否短路,经过长时间的测量和ic原厂的工程师帮助下,硬件在FPC上飞线, 屏的FPC终于是正常联通了!这立

IDA 调试 Android 方法及简单的脱壳实现

IDA 调试 Android 方法及简单的脱壳实现 标签: android原创逆向调试dalvik 2016-05-24 14:24 9286人阅读 评论(3) 收藏 举报 分类: 原创(25) Android(5) 学习(9) 逆向(4) 版权声明:本文为博主原创文章,未经博主允许不得转载. 目录(?)[+] 本文参考了一些网络文章,对大大们的技术分享表示感谢.小弟刚刚开始深入去搞Android的逆向不久,写一下学习笔记,希望能抛砖引玉,给新手同学们带来方便.文笔比较烂,这不重要,重要的是按自

20150430 调试分析之 根据内核报错信息PC指针分析错误

20150430 调试分析之 根据内核报错信息PC指针分析错误 2015-04-30 Lover雪儿 大家写驱动的时候不知道有没有发现,当我们驱动写错了,发生内核奔溃时,会打印一大堆的报错信息, 如果再返回我们的程序中一行一行代码的检查,既耗费时间,并且有些逻辑上的错误,我们是很难看的出来的, 那我们能不能再这一大堆的报错信息中发现问题的所在呢? 此处我们来模拟一个错误,还是沿用上一篇文章中的驱动代码err_led.c的驱动程序中的代码修改错误,当然大家用其他的驱动代码做测试也可以. 博客地址:

转: 关于Linux常用的二进制文件分析方法

当你在unix下拿到一个二进制文件但不知道它是什么的时候,可以通过以下方法得到一此提示 1. 最首先应该尝试strings命令,比如拿到一个叫cr1的二进制文件,可以: $ strings cr1 | more 里面可能会有一些对于这个cr1的描述,这些信息都是编译之后在程序中留下的一些文本性的说明,所以可能会告诉你这个文件是什么. 比如有输出: $ strings cr1 | more %s %s %s%s%s -> %s%s%s (%.*s) Version: 2.3 Usage: dsni

Appium Server源码分析之作为Bootstrap客户端

Appium Server拥有两个主要的功能: 它是个http服务器,它专门接收从客户端通过基于http的REST协议发送过来的命令 他是bootstrap客户端:它接收到客户端的命令后,需要想办法把这些命令发送给目标安卓机器的bootstrap来驱动uiatuomator来做事情 通过上一篇文章<Appium Server 源码分析之启动运行Express http服务器>我们分析了Appium Server是如何作为一个http服务器进行工作的.那么今天我们就要分析第二点,Appium S

【第二周作业】面向过程(或者叫结构化)分析方法与面向对象分析方法到底区别在哪里?

书上的一些概念这里不再复述,仅谈谈自己通过阅读教材.上课听讲后自己的一些理解: 面向过程分析方法注重自顶向下,逐层分析,把整个软件系统的功能逐布分解,各个击破.可以用生活中的一个例子来加以理解——去食堂吃饭.到达食堂(比如琴湖食堂)后,要遵从排队——打饭——阿姨打菜——拿筷子——找位子坐好——开吃,整个过程强调顺序性,比如不拿筷子就坐下是不行的,除非拿手抓.面向过程就是将软件系统所需要实现的功能按照以上类似的思路逐步细分,一步一步要做什么都要分析清楚. 面向对象分析方法则注重分析整个系统的逻辑结

面向过程(或者叫结构化)分析方法与面向对象分析方法到底区别在哪里?

结构化分析方法的分析步骤:1 理解和分析当前的现实环境 已获得当前系统的具体模型 2 建立当前系统的逻辑模型 3 建立目标系统的逻辑模型 4 进一步完善目标系统的逻辑模型 面向对象分析方法:根据面向对象的过程模型 面向对象的需求分析从概念上分为问题分析和应用分析两个方面  问题分析:主要收集并确认用户需求 最后将信息链接最终建立关于对象的分析模型 应用分析:主要是动态描述系统中对象的合法状态序列 并用动态模型表达对象的动态行为 对象之间的消息传递和协同工作的动态信息 综上:结构化分析方法是先创建