滑动运行不起来

来源:1-9 页面简单滑动函数封装

慕运维7502007

2020-07-10

[info] [35m[Appium][39m Welcome to Appium v1.17.1
[info] [35m[Appium][39m Non-default server args:
[info] [35m[Appium][39m allowInsecure: {
[info] [35m[Appium][39m }
[info] [35m[Appium][39m denyInsecure: {
[info] [35m[Appium][39m }
[info] [35m[Appium][39m Appium REST http interface listener started on 0.0.0.0:4723[info] [35m[HTTP][39m [37m–>[39m [37mPOST[39m [37m/wd/hub/session[39m
[info] [35m[HTTP][39m [90m{“capabilities”:{“firstMatch”:[{“platformName”:“Android”,“appium:platformVersion”:“9”,“appium:deviceName”:“c7adc19”,“appium:app”:“E:\youyoubaoapk\youyoubao.apk”}]},“desiredCapabilities”:{“platformName”:“Android”,“platformVersion”:“9”,“deviceName”:“c7adc19”,“app”:“E:\youyoubaoapk\youyoubao.apk”}}[39m
[debug] [35m[W3C][39m Calling AppiumDriver.createSession() with args: [{“platformName”:“Android”,“platformVersion”:“9”,“deviceName”:“c7adc19”,“app”:“E:\youyoubaoapk\youyoubao.apk”},null,{“firstMatch”:[{“platformName”:“Android”,“appium:platformVersion”:“9”,“appium:deviceName”:“c7adc19”,“appium:app”:“E:\youyoubaoapk\youyoubao.apk”}]}]
[debug] [35m[BaseDriver][39m Event ‘newSessionRequested’ logged at 1594363155649 (14:39:15 GMT+0800 (中国标准时间))
[warn] [35m[Appium][39m
[warn] [35m[Appium][39m ======================================================================
[warn] [35m[Appium][39m DEPRECATION WARNING:
[warn] [35m[Appium][39m
[warn] [35m[Appium][39m The ‘automationName’ capability was not provided in the desired
[warn] [35m[Appium][39m capabilities for this Android session
[warn] [35m[Appium][39m
[warn] [35m[Appium][39m Setting ‘automationName=UiAutomator2’ by default and using the
[warn] [35m[Appium][39m UiAutomator2 Driver
[warn] [35m[Appium][39m
[warn] [35m[Appium][39m The next major version of Appium (2.x) will require the
[warn] [35m[Appium][39m ‘automationName’ capability to be set for all sessions on all
[warn] [35m[Appium][39m platforms
[warn] [35m[Appium][39m
[warn] [35m[Appium][39m In previous versions (Appium <= 1.13.x), the default was
[warn] [35m[Appium][39m ‘automationName=UiAutomator1’
[warn] [35m[Appium][39m
[warn] [35m[Appium][39m If you wish to use that automation instead of UiAutomator2, please
[warn] [35m[Appium][39m add ‘automationName=UiAutomator1’ to your desired capabilities
[warn] [35m[Appium][39m
[warn] [35m[Appium][39m For more information about drivers, please visit
[warn] [35m[Appium][39m http://appium.io/docs/en/about-appium/intro/ and explore the
[warn] [35m[Appium][39m ‘Drivers’ menu
[warn] [35m[Appium][39m
[warn] [35m[Appium][39m ======================================================================
[warn] [35m[Appium][39m
[info] [35m[Appium][39m Appium v1.17.1 creating new AndroidUiautomator2Driver (v1.44.2) session
[debug] [35m[BaseDriver][39m W3C capabilities and MJSONWP desired capabilities were provided
[debug] [35m[BaseDriver][39m Creating session with W3C capabilities: {
[debug] [35m[BaseDriver][39m “alwaysMatch”: {
[debug] [35m[BaseDriver][39m “platformName”: “Android”,
[debug] [35m[BaseDriver][39m “appium:platformVersion”: “9”,
[debug] [35m[BaseDriver][39m “appium:deviceName”: “c7adc19”,
[debug] [35m[BaseDriver][39m “appium:app”: “E:\youyoubaoapk\youyoubao.apk”
[debug] [35m[BaseDriver][39m },
[debug] [35m[BaseDriver][39m “firstMatch”: [
[debug] [35m[BaseDriver][39m {}
[debug] [35m[BaseDriver][39m ]
[debug] [35m[BaseDriver][39m }
[info] [35m[BaseDriver][39m Session created with session id: f23d81fe-6e06-463a-9176-e4d0ce725405
[info] [35m[BaseDriver][39m Using local app ‘E:\youyoubaoapk\youyoubao.apk’
[debug] [35m[UiAutomator2][39m Checking whether app is actually present
[info] [35m[ADB][39m Using ‘adb.exe’ from ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe’
[info] [35m[AndroidDriver][39m Retrieving device list
[debug] [35m[ADB][39m Trying to find a connected android device
[debug] [35m[ADB][39m Getting connected devices…
[debug] [35m[ADB][39m Connected devices: [{“udid”:“c7adc19”,“state”:“device”}]
[info] [35m[AndroidDriver][39m Looking for a device with Android ‘9.0.0’
[debug] [35m[ADB][39m Setting device id to c7adc19
[info] [35m[ADB][39m Getting device platform version
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell getprop ro.build.version.release’
[debug] [35m[ADB][39m Current device property ‘ro.build.version.release’: 9
[info] [35m[AndroidDriver][39m Using device: c7adc19
[info] [35m[ADB][39m Using ‘adb.exe’ from ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe’
[debug] [35m[ADB][39m Setting device id to c7adc19
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell getprop ro.build.version.sdk’[debug] [35m[ADB][39m Current device property ‘ro.build.version.sdk’: 28
[info] [35m[ADB][39m Getting device platform version
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell getprop ro.build.version.release’
[debug] [35m[ADB][39m Current device property ‘ro.build.version.release’: 9
[debug] [35m[ADB][39m Device API level: 28
[warn] [35m[UiAutomator2][39m Relaxing hidden api policy
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell settings put global hidden_api_policy_pre_p_apps 1’[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell settings put global hidden_api_policy_p_apps 1’
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell settings put global hidden_api_policy 1’[debug] [35m[AndroidDriver][39m Parsing package and activity from app manifest
[info] [35m[ADB][39m Package name: ‘com.youyoubaoxian.ua
[info] [35m[ADB][39m Main activity name: ‘com.youyoubaoxian.yybadvisor.activity.guide.SplashActivity’
[debug] [35m[AndroidDriver][39m Parsed package and activity are: com.youyoubaoxian.ua/com.youyoubaoxian.yybadvisor.activity.guide.SplashActivity
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 wait-for-device’[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell echo ping’
[debug] [35m[AndroidDriver][39m Pushing settings apk to device…
[debug] [35m[ADB][39m Getting install status for io.appium.settings
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell dumpsys package io.appium.settings’[debug] [35m[ADB][39m The version name of the installed ‘io.appium.settings’ is greater or equal to the application version name (‘3.1.0’ >= ‘3.1.0’)
[debug] [35m[ADB][39m There is no need to install/upgrade ‘C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\io.appium.settings\apks\settings_apk-debug.apk’
[debug] [35m[ADB][39m Getting IDs of all ‘io.appium.settings’ processes
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell ‘pgrep --help; echo $?’’[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell pgrep -f io\.appium\.settings’
[debug] [35m[AndroidDriver][39m io.appium.settings is already running. There is no need to reset its permissions.
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell appops set io.appium.settings android:mock_location allow’[debug] [35m[Logcat][39m Starting logcat capture[debug] [35m[UiAutomator2][39m Forwarding UiAutomator2 Server port 6790 to 8200
[debug] [35m[ADB][39m Forwarding system: 8200 to device: 6790
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 forward tcp:8200 tcp:6790’
[debug] [35m[ADB][39m Getting install status for io.appium.uiautomator2.server
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell dumpsys package io.appium.uiautomator2.server’[debug] [35m[ADB][39m ‘io.appium.uiautomator2.server’ is installed
[debug] [35m[ADB][39m Getting package info for ‘io.appium.uiautomator2.server’
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell dumpsys package io.appium.uiautomator2.server’
[debug] [35m[ADB][39m The version name of the installed ‘io.appium.uiautomator2.server’ is greater or equal to the application version name (‘4.5.5’ >= ‘4.5.5’)
[debug] [35m[UiAutomator2][39m io.appium.uiautomator2.server installation state: sameVersionInstalled
[debug] [35m[ADB][39m Checking app cert for C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.5.apk
[info] [35m[ADB][39m Using ‘apksigner.jar’ from ‘C:\Program Files\Android\android-sdk\build-tools\29.0.3\lib\apksigner.jar’
[debug] [35m[ADB][39m Starting apksigner: ‘C:\Program Files (x86)\Java\jdk1.8.0_251\bin\java.exe’ -Xmx1024M -Xss1m -jar ‘C:\Program Files\Android\android-sdk\build-tools\29.0.3\lib\apksigner.jar’ verify --print-certs ‘C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.5.apk’[debug] [35m[ADB][39m apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [35m[ADB][39m Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [35m[ADB][39m Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [35m[ADB][39m Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [35m[ADB][39m
[debug] [35m[ADB][39m ‘C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.5.apk’ is signed with the default certificate
[debug] [35m[ADB][39m Getting install status for io.appium.uiautomator2.server.test
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell dumpsys package io.appium.uiautomator2.server.test’[debug] [35m[ADB][39m ‘io.appium.uiautomator2.server.test’ is installed
[debug] [35m[ADB][39m Checking app cert for C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
[debug] [35m[ADB][39m Starting apksigner: ‘C:\Program Files (x86)\Java\jdk1.8.0_251\bin\java.exe’ -Xmx1024M -Xss1m -jar ‘C:\Program Files\Android\android-sdk\build-tools\29.0.3\lib\apksigner.jar’ verify --print-certs ‘C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk’[debug] [35m[ADB][39m apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [35m[ADB][39m Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [35m[ADB][39m Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [35m[ADB][39m Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [35m[ADB][39m
[debug] [35m[ADB][39m ‘C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk’ is signed with the default certificate
[info] [35m[UiAutomator2][39m Server packages are not going to be (re)installed
[debug] [35m[UiAutomator2][39m Waiting up to 30000ms for services to be available
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell pm list instrumentation’[debug] [35m[UiAutomator2][39m Instrumentation target ‘io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner’ is available
[debug] [35m[ADB][39m Checking app cert for E:\youyoubaoapk\youyoubao.apk
[debug] [35m[ADB][39m Starting apksigner: ‘C:\Program Files (x86)\Java\jdk1.8.0_251\bin\java.exe’ -Xmx1024M -Xss1m -jar ‘C:\Program Files\Android\android-sdk\build-tools\29.0.3\lib\apksigner.jar’ verify --print-certs E:\youyoubaoapk\youyoubao.apk[debug] [35m[ADB][39m apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [35m[ADB][39m Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [35m[ADB][39m Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [35m[ADB][39m Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [35m[ADB][39m
[debug] [35m[ADB][39m ‘E:\youyoubaoapk\youyoubao.apk’ is signed with the default certificate
[debug] [35m[ADB][39m Getting install status for com.youyoubaoxian.ua
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell dumpsys package com.youyoubaoxian.ua’[debug] [35m[ADB][39m The version name of the installed ‘com.youyoubaoxian.ua’ is greater or equal to the application version name (‘2.8.1’ >= ‘2.8.1’)
[debug] [35m[ADB][39m There is no need to install/upgrade ‘E:\youyoubaoapk\youyoubao.apk’
[info] [35m[AndroidDriver][39m Performing fast reset on ‘com.youyoubaoxian.ua
[debug] [35m[ADB][39m Getting install status for com.youyoubaoxian.ua
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell dumpsys package com.youyoubaoxian.ua’[debug] [35m[ADB][39m ‘com.youyoubaoxian.ua’ is installed
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell am force-stop com.youyoubaoxian.ua’[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell pm clear com.youyoubaoxian.ua’[debug] [35m[AndroidDriver][39m Performed fast reset on the installed ‘com.youyoubaoxian.ua’ application (stop and clear)
[debug] [35m[UiAutomator2][39m Performing shallow cleanup of automation leftovers
[debug] [35m[UiAutomator2][39m No obsolete sessions have been detected (Error: socket hang up)
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell am force-stop io.appium.uiautomator2.server.test’
[info] [35m[UiAutomator2][39m Starting UIAutomator2 server 4.5.5
[info] [35m[UiAutomator2][39m Using UIAutomator2 server from ‘C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.5.apk’ and test from ‘C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk’
[info] [35m[UiAutomator2][39m Waiting up to 30000ms for UiAutomator2 to be online…
[debug] [35m[ADB][39m Creating ADB subprocess with args: ["-P",5037,"-s",“c7adc19”,“shell”,“am”,“instrument”,"-w",“io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner”][debug] [35m[WD Proxy][39m Matched ‘/status’ to command name ‘getStatus’
[debug] [35m[WD Proxy][39m Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body
[info] [35m[WD Proxy][39m Got response with unknown status: {“code”:“ECONNRESET”}[debug] [35m[Instrumentation][39m io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:[debug] [35m[WD Proxy][39m Matched ‘/status’ to command name ‘getStatus’
[debug] [35m[WD Proxy][39m Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body
[info] [35m[WD Proxy][39m Got response with unknown status: {“code”:“ECONNRESET”}[debug] [35m[WD Proxy][39m Matched ‘/status’ to command name ‘getStatus’
[debug] [35m[WD Proxy][39m Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body[debug] [35m[WD Proxy][39m Got response with status 200: {“sessionId”:“None”,“value”:{“ready”:true,“message”:“UiAutomator2 Server is ready to accept commands”}}
[debug] [35m[UiAutomator2][39m The initialization of the instrumentation process took 3161ms
[debug] [35m[WD Proxy][39m Matched ‘/session’ to command name ‘createSession’
[debug] [35m[WD Proxy][39m Proxying [POST /session] to [POST http://127.0.0.1:8200/wd/hub/session] with body: {“capabilities”:{“firstMatch”:[{“platform”:“LINUX”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“platformName”:“Android”,“platformVersion”:“9”,“deviceName”:“c7adc19”,“app”:“E:\youyoubaoapk\youyoubao.apk”},“platformName”:“Android”,“platformVersion”:“9”,“deviceName”:“c7adc19”,“app”:“E:\youyoubaoapk\youyoubao.apk”,“deviceUDID”:“c7adc19”,“appPackage”:“com.youyoubaoxian.ua”}],“alwaysMatch”:{}}}
[debug] [35m[WD Proxy][39m Got response with status 200: {“sessionId”:“a41102ee-41ca-471c-a99d-7110f083d6dc”,“value”:{“sessionId”:“a41102ee-41ca-471c-a99d-7110f083d6dc”,“capabilities”:{“firstMatch”:[{“platform”:“LINUX”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“platformName”:“Android”,“platformVersion”:“9”,“deviceName”:“c7adc19”,“app”:“E:\youyoubaoapk\youyoubao.apk”},“platformName”:“Android”,“platformVersion”:“9”,“deviceName”:“c7adc19”,“app”:“E:\youyoubaoapk\youyoubao.apk”,“deviceUDID”:“c7adc19”,“appPackage”:“com.youyoubaoxian.ua”}],“alwaysMatch”:{}}}}
[info] [35m[WD Proxy][39m Determined the downstream protocol as ‘W3C’
[debug] [35m[WD Proxy][39m Proxying [GET /appium/device/info] to [GET http://127.0.0.1:8200/wd/hub/session/a41102ee-41ca-471c-a99d-7110f083d6dc/appium/device/info] with no body
[debug] [35m[WD Proxy][39m Got response with status 200: {“sessionId”:“a41102ee-41ca-471c-a99d-7110f083d6dc”,“value”:{“androidId”:“a50cfeddf30cb315”,“manufacturer”:“Xiaomi”,“model”:“Redmi Note 8”,“brand”:“xiaomi”,“apiVersion”:“28”,“platformVersion”:“9”,“carrierName”:“中国联通”,“realDisplaySize”:“1080x2340”,“displayDensity”:440,“networks”:[{“type”:0,“typeName”:“MOBILE”,“subtype”:13,“subtypeName”:“LTE”,“isConnected”:true,“detailedState”:“CONNECTED”,“state”:“CONNECTED”,“extraInfo”:“ims”,“isAvailable”:true,“isFailover”:false,“isRoaming”:false,“capabilities”:{“transportTypes”:“TRANSPORT_CELLULAR”,“networkCapabilities”:“NET_CAPABILITY_IMS,NET_CAPABILITY_NOT_METERED,NET_CAPABILITY_TRUSTED,NET_CAPABILITY_NOT_VPN,NET_CAPABILITY_VALIDATED,NET_CAPABILITY_NOT_ROAMING,NET_CAPABILITY_FOREGROUND,NET_CAPABILITY_NOT_CONGESTED,NET_CAPABILITY_NOT_SUSPENDED”,“linkUpstreamBandwidthKbps”:51200,“linkDownBandwidthKbps”:102400,“signalStrength”:-2147483648,“networkSpecifier”:“1”,“SSID”:null}},{“type”:1,“typeName”:“WIFI”,“subtype”:0,“subtypeName”:"",“isConnected”:true,“detailedState”:“CONNECT…
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell dumpsys window’[info] [35m[AndroidDriver][39m Screen already unlocked, doing nothing
[info] [35m[UiAutomator2][39m Starting 'com.youyoubaoxian.ua/com.youyoubaoxian.yybadvisor.activity.guide.SplashActivity and waiting for ‘com.youyoubaoxian.ua/com.youyoubaoxian.yybadvisor.activity.guide.SplashActivity
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell am start -W -n com.youyoubaoxian.ua/com.youyoubaoxian.yybadvisor.activity.guide.SplashActivity -S’[debug] [35m[ADB][39m Waiting up to 20000ms for activity matching pkg: ‘com.youyoubaoxian.ua’ and activity: ‘com.youyoubaoxian.yybadvisor.activity.guide.SplashActivity’ to be focused
[debug] [35m[ADB][39m Possible activities, to be checked: ‘com.youyoubaoxian.yybadvisor.activity.guide.SplashActivity’, ‘com.youyoubaoxian.ua.com.youyoubaoxian.yybadvisor.activity.guide.SplashActivity’
[debug] [35m[ADB][39m Getting focused package and activity
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell dumpsys window windows’[debug] [35m[WD Proxy][39m Got response with status 200: {“sessionId”:“a41102ee-41ca-471c-a99d-7110f083d6dc”,“value”:2.75}
[debug] [35m[WD Proxy][39m Matched ‘/appium/device/system_bars’ to command name ‘getSystemBars’
[debug] [35m[WD Proxy][39m Proxying [GET /appium/device/system_bars] to [GET http://127.0.0.1:8200/wd/hub/session/a41102ee-41ca-471c-a99d-7110f083d6dc/appium/device/system_bars] with body: {}
[debug] [35m[WD Proxy][39m Got response with status 200: {“sessionId”:“a41102ee-41ca-471c-a99d-7110f083d6dc”,“value”:{“statusBar”:80}}
[debug] [35m[WD Proxy][39m Matched ‘/window/current/size’ to command name ‘getWindowSize’
[debug] [35m[WD Proxy][39m Proxying [GET /window/current/size] to [GET http://127.0.0.1:8200/wd/hub/session/a41102ee-41ca-471c-a99d-7110f083d6dc/window/current/size] with body: {}
[debug] [35m[WD Proxy][39m Got response with status 200: {“sessionId”:“a41102ee-41ca-471c-a99d-7110f083d6dc”,“value”:{“height”:2130,“width”:1080}}
[info] [35m[Appium][39m New AndroidUiautomator2Driver session created successfully, session f23d81fe-6e06-463a-9176-e4d0ce725405 added to master session list
[debug] [35m[BaseDriver][39m Event ‘newSessionStarted’ logged at 1594363167209 (14:39:27 GMT+0800 (中国标准时间))
[debug] [35m[W3C (f23d81fe)][39m Cached the protocol value ‘W3C’ for the new session f23d81fe-6e06-463a-9176-e4d0ce725405
[debug] [35m[W3C (f23d81fe)][39m Responding to client with driver.createSession() result: {“capabilities”:{“platform”:“LINUX”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“platformName”:“Android”,“platformVersion”:“9”,“deviceName”:“c7adc19”,“app”:“E:\youyoubaoapk\youyoubao.apk”},“platformName”:“Android”,“platformVersion”:“9”,“deviceName”:“c7adc19”,“app”:“E:\youyoubaoapk\youyoubao.apk”,“deviceUDID”:“c7adc19”,“appPackage”:“com.youyoubaoxian.ua”,“deviceApiLevel”:28,“deviceScreenSize”:“1080x2340”,“deviceScreenDensity”:440,“deviceModel”:“Redmi Note 8”,“deviceManufacturer”:“Xiaomi”,“pixelRatio”:2.75,“statBarHeight”:80,“viewportRect”:{“left”:0,“top”:80,“width”:1080,“height”:2050}}}
[info] [35m[HTTP][39m [37m<-- POST /wd/hub/session [39m[32m200[39m [90m11561 ms - 799[39m
[info] [35m[HTTP][39m [90m[39m
[info] [35m[HTTP][39m [37m–>[39m [37mPOST[39m [37m/wd/hub/session/f23d81fe-6e06-463a-9176-e4d0ce725405/element[39m
[info] [35m[HTTP][39m [90m{“using”:“xpath”,“value”:”//[@text=‘我知道了’]"}[39m
[debug] [35m[W3C (f23d81fe)][39m Calling AppiumDriver.findElement() with args: [“xpath”,"//
[@text=‘我知道了’]",“f23d81fe-6e06-463a-9176-e4d0ce725405”]
[debug] [35m[BaseDriver][39m Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [35m[BaseDriver][39m Waiting up to 0 ms for condition
[debug] [35m[WD Proxy][39m Matched ‘/element’ to command name ‘findElement’
[debug] [35m[WD Proxy][39m Proxying [POST /element] to [POST http://127.0.0.1:8200/wd/hub/session/a41102ee-41ca-471c-a99d-7110f083d6dc/element] with body: {“strategy”:“xpath”,“selector”:"//[@text=‘我知道了’]",“context”:"",“multiple”:false}[debug] [35m[WD Proxy][39m Got response with status 200: {“sessionId”:“a41102ee-41ca-471c-a99d-7110f083d6dc”,“value”:{“ELEMENT”:“4eb5a540-d82a-40c9-b316-f21250b7512c”,“element-6066-11e4-a52e-4f735466cecf”:“4eb5a540-d82a-40c9-b316-f21250b7512c”}}
[debug] [35m[W3C (f23d81fe)][39m Responding to client with driver.findElement() result: {“element-6066-11e4-a52e-4f735466cecf”:“4eb5a540-d82a-40c9-b316-f21250b7512c”,“ELEMENT”:“4eb5a540-d82a-40c9-b316-f21250b7512c”}
[info] [35m[HTTP][39m [37m<-- POST /wd/hub/session/f23d81fe-6e06-463a-9176-e4d0ce725405/element [39m[32m200[39m [90m325 ms - 137[39m
[info] [35m[HTTP][39m [90m[39m
[info] [35m[HTTP][39m [37m–>[39m [37mPOST[39m [37m/wd/hub/session/f23d81fe-6e06-463a-9176-e4d0ce725405/element/4eb5a540-d82a-40c9-b316-f21250b7512c/click[39m
[info] [35m[HTTP][39m [90m{“id”:“4eb5a540-d82a-40c9-b316-f21250b7512c”}[39m
[debug] [35m[W3C (f23d81fe)][39m Calling AppiumDriver.click() with args: [“4eb5a540-d82a-40c9-b316-f21250b7512c”,“f23d81fe-6e06-463a-9176-e4d0ce725405”]
[debug] [35m[WD Proxy][39m Matched ‘/element/4eb5a540-d82a-40c9-b316-f21250b7512c/click’ to command name ‘click’
[debug] [35m[WD Proxy][39m Proxying [POST /element/4eb5a540-d82a-40c9-b316-f21250b7512c/click] to [POST http://127.0.0.1:8200/wd/hub/session/a41102ee-41ca-471c-a99d-7110f083d6dc/element/4eb5a540-d82a-40c9-b316-f21250b7512c/click] with body: {“element”:“4eb5a540-d82a-40c9-b316-f21250b7512c”}
[debug] [35m[WD Proxy][39m Got response with status 200: {“sessionId”:“a41102ee-41ca-471c-a99d-7110f083d6dc”,“value”:null}
[debug] [35m[W3C (f23d81fe)][39m Responding to client with driver.click() result: null
[info] [35m[HTTP][39m [37m<-- POST /wd/hub/session/f23d81fe-6e06-463a-9176-e4d0ce725405/element/4eb5a540-d82a-40c9-b316-f21250b7512c/click [39m[32m200[39m [90m32 ms - 14[39m
[info] [35m[HTTP][39m [90m[39m
[info] [35m[HTTP][39m [37m–>[39m [37mPOST[39m [37m/wd/hub/session/f23d81fe-6e06-463a-9176-e4d0ce725405/element[39m
[info] [35m[HTTP][39m [90m{“using”:“xpath”,“value”:"//
[@text=‘同意’]"}[39m
[debug] [35m[W3C (f23d81fe)][39m Calling AppiumDriver.findElement() with args: [“xpath”,"//[@text=‘同意’]",“f23d81fe-6e06-463a-9176-e4d0ce725405”]
[debug] [35m[BaseDriver][39m Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [35m[BaseDriver][39m Waiting up to 0 ms for condition
[debug] [35m[WD Proxy][39m Matched ‘/element’ to command name ‘findElement’
[debug] [35m[WD Proxy][39m Proxying [POST /element] to [POST http://127.0.0.1:8200/wd/hub/session/a41102ee-41ca-471c-a99d-7110f083d6dc/element] with body: {“strategy”:“xpath”,“selector”:"//
[@text=‘同意’]",“context”:"",“multiple”:false}[debug] [35m[WD Proxy][39m Got response with status 200: {“sessionId”:“a41102ee-41ca-471c-a99d-7110f083d6dc”,“value”:{“ELEMENT”:“72c03378-99ec-4dba-adf0-ebef68e1abb2”,“element-6066-11e4-a52e-4f735466cecf”:“72c03378-99ec-4dba-adf0-ebef68e1abb2”}}
[debug] [35m[W3C (f23d81fe)][39m Responding to client with driver.findElement() result: {“element-6066-11e4-a52e-4f735466cecf”:“72c03378-99ec-4dba-adf0-ebef68e1abb2”,“ELEMENT”:“72c03378-99ec-4dba-adf0-ebef68e1abb2”}
[info] [35m[HTTP][39m [37m<-- POST /wd/hub/session/f23d81fe-6e06-463a-9176-e4d0ce725405/element [39m[32m200[39m [90m352 ms - 137[39m
[info] [35m[HTTP][39m [90m[39m
[info] [35m[HTTP][39m [37m–>[39m [37mPOST[39m [37m/wd/hub/session/f23d81fe-6e06-463a-9176-e4d0ce725405/element/72c03378-99ec-4dba-adf0-ebef68e1abb2/click[39m
[info] [35m[HTTP][39m [90m{“id”:“72c03378-99ec-4dba-adf0-ebef68e1abb2”}[39m
[debug] [35m[W3C (f23d81fe)][39m Calling AppiumDriver.click() with args: [“72c03378-99ec-4dba-adf0-ebef68e1abb2”,“f23d81fe-6e06-463a-9176-e4d0ce725405”]
[debug] [35m[WD Proxy][39m Matched ‘/element/72c03378-99ec-4dba-adf0-ebef68e1abb2/click’ to command name ‘click’
[debug] [35m[WD Proxy][39m Proxying [POST /element/72c03378-99ec-4dba-adf0-ebef68e1abb2/click] to [POST http://127.0.0.1:8200/wd/hub/session/a41102ee-41ca-471c-a99d-7110f083d6dc/element/72c03378-99ec-4dba-adf0-ebef68e1abb2/click] with body: {“element”:“72c03378-99ec-4dba-adf0-ebef68e1abb2”}[debug] [35m[WD Proxy][39m Got response with status 200: {“sessionId”:“a41102ee-41ca-471c-a99d-7110f083d6dc”,“value”:null}
[debug] [35m[W3C (f23d81fe)][39m Responding to client with driver.click() result: null
[info] [35m[HTTP][39m [37m<-- POST /wd/hub/session/f23d81fe-6e06-463a-9176-e4d0ce725405/element/72c03378-99ec-4dba-adf0-ebef68e1abb2/click [39m[32m200[39m [90m288 ms - 14[39m
[info] [35m[HTTP][39m [90m[39m
[info] [35m[HTTP][39m [37m–>[39m [37mGET[39m [37m/wd/hub/session/f23d81fe-6e06-463a-9176-e4d0ce725405/window/rect[39m
[info] [35m[HTTP][39m [90m{}[39m
[debug] [35m[W3C (f23d81fe)][39m Calling AppiumDriver.getWindowRect() with args: [“f23d81fe-6e06-463a-9176-e4d0ce725405”]
[debug] [35m[WD Proxy][39m Matched ‘/window/current/size’ to command name ‘getWindowSize’
[debug] [35m[WD Proxy][39m Proxying [GET /window/current/size] to [GET http://127.0.0.1:8200/wd/hub/session/a41102ee-41ca-471c-a99d-7110f083d6dc/window/current/size] with body: {}
[debug] [35m[WD Proxy][39m Got response with status 200: {“sessionId”:“a41102ee-41ca-471c-a99d-7110f083d6dc”,“value”:{“height”:2130,“width”:1080}}
[debug] [35m[W3C (f23d81fe)][39m Responding to client with driver.getWindowRect() result: {“width”:1080,“height”:2130,“x”:0,“y”:0}
[info] [35m[HTTP][39m [37m<-- GET /wd/hub/session/f23d81fe-6e06-463a-9176-e4d0ce725405/window/rect [39m[32m200[39m [90m22 ms - 50[39m
[info] [35m[HTTP][39m [90m[39m
[info] [35m[HTTP][39m [37m–>[39m [37mGET[39m [37m/wd/hub/session/f23d81fe-6e06-463a-9176-e4d0ce725405/window/rect[39m
[info] [35m[HTTP][39m [90m{}[39m
[debug] [35m[W3C (f23d81fe)][39m Calling AppiumDriver.getWindowRect() with args: [“f23d81fe-6e06-463a-9176-e4d0ce725405”]
[debug] [35m[WD Proxy][39m Matched ‘/window/current/size’ to command name ‘getWindowSize’
[debug] [35m[WD Proxy][39m Proxying [GET /window/current/size] to [GET http://127.0.0.1:8200/wd/hub/session/a41102ee-41ca-471c-a99d-7110f083d6dc/window/current/size] with body: {}
[debug] [35m[WD Proxy][39m Got response with status 200: {“sessionId”:“a41102ee-41ca-471c-a99d-7110f083d6dc”,“value”:{“height”:2130,“width”:1080}}
[debug] [35m[W3C (f23d81fe)][39m Responding to client with driver.getWindowRect() result: {“width”:1080,“height”:2130,“x”:0,“y”:0}
[info] [35m[HTTP][39m [37m<-- GET /wd/hub/session/f23d81fe-6e06-463a-9176-e4d0ce725405/window/rect [39m[32m200[39m [90m15 ms - 50[39m
[info] [35m[HTTP][39m [90m[39m
[info] [35m[HTTP][39m [37m–>[39m [37mGET[39m [37m/wd/hub/session/f23d81fe-6e06-463a-9176-e4d0ce725405/window/rect[39m
[info] [35m[HTTP][39m [90m{}[39m
[debug] [35m[W3C (f23d81fe)][39m Calling AppiumDriver.getWindowRect() with args: [“f23d81fe-6e06-463a-9176-e4d0ce725405”]
[debug] [35m[WD Proxy][39m Matched ‘/window/current/size’ to command name ‘getWindowSize’
[debug] [35m[WD Proxy][39m Proxying [GET /window/current/size] to [GET http://127.0.0.1:8200/wd/hub/session/a41102ee-41ca-471c-a99d-7110f083d6dc/window/current/size] with body: {}
[debug] [35m[WD Proxy][39m Got response with status 200: {“sessionId”:“a41102ee-41ca-471c-a99d-7110f083d6dc”,“value”:{“height”:2130,“width”:1080}}
[debug] [35m[W3C (f23d81fe)][39m Responding to client with driver.getWindowRect() result: {“width”:1080,“height”:2130,“x”:0,“y”:0}
[info] [35m[HTTP][39m [37m<-- GET /wd/hub/session/f23d81fe-6e06-463a-9176-e4d0ce725405/window/rect [39m[32m200[39m [90m16 ms - 50[39m
[info] [35m[HTTP][39m [90m[39m
[info] [35m[HTTP][39m [37m–>[39m [37mPOST[39m [37m/wd/hub/session/f23d81fe-6e06-463a-9176-e4d0ce725405/touch/perform[39m
[info] [35m[HTTP][39m [90m{“actions”:[{“action”:“press”,“options”:{“x”:972,“y”:1065}},{“action”:“wait”,“options”:{“ms”:0}},{“action”:“moveTo”,“options”:{“x”:108,“y”:1065}},{“action”:“release”,“options”:{}}]}[39m
[debug] [35m[W3C (f23d81fe)][39m Calling AppiumDriver.performTouch() with args: [[{“action”:“press”,“options”:{“x”:972,“y”:1065}},{“action”:“wait”,“options”:{“ms”:0}},{“action”:“moveTo”,“options”:{“x”:108,“y”:1065}},{“action”:“release”,“options”:{}}],“f23d81fe-6e06-463a-9176-e4d0ce725405”]
[debug] [35m[WD Proxy][39m Matched ‘/touch/perform’ to command name ‘performTouch’
[debug] [35m[WD Proxy][39m Proxying [POST /touch/perform] to [POST http://127.0.0.1:8200/wd/hub/session/a41102ee-41ca-471c-a99d-7110f083d6dc/touch/perform] with body: {“startX”:972,“startY”:1065,“endX”:108,“endY”:1065,“steps”:22}[debug] [35m[WD Proxy][39m Got response with status 200: {“sessionId”:“a41102ee-41ca-471c-a99d-7110f083d6dc”,“value”:null}
[debug] [35m[W3C (f23d81fe)][39m Responding to client with driver.performTouch() result: null
[info] [35m[HTTP][39m [37m<-- POST /wd/hub/session/f23d81fe-6e06-463a-9176-e4d0ce725405/touch/perform [39m[32m200[39m [90m1519 ms - 14[39m
[info] [35m[HTTP][39m [90m[39m[warn] [35m[BaseDriver][39m Shutting down because we waited 60 seconds for a command
[warn] [35m[Appium][39m Closing session, cause was ‘New Command Timeout of 60 seconds expired. Try customizing the timeout using the ‘newCommandTimeout’ desired capability’
[info] [35m[Appium][39m Removing session ‘f23d81fe-6e06-463a-9176-e4d0ce725405’ from our master session list
[debug] [35m[UiAutomator2][39m Deleting UiAutomator2 session
[debug] [35m[UiAutomator2][39m Deleting UiAutomator2 server session
[debug] [35m[WD Proxy][39m Matched ‘/’ to command name ‘deleteSession’
[debug] [35m[WD Proxy][39m Proxying [DELETE /] to [DELETE http://127.0.0.1:8200/wd/hub/session/a41102ee-41ca-471c-a99d-7110f083d6dc] with no body
[debug] [35m[WD Proxy][39m Got response with status 200: {“sessionId”:“a41102ee-41ca-471c-a99d-7110f083d6dc”,“value”:null}
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell am force-stop com.youyoubaoxian.ua’[debug] [35m[Instrumentation][39m .
[debug] [35m[Logcat][39m Stopping logcat capture
[debug] [35m[ADB][39m Removing forwarded port socket connection: 8200
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 forward --remove tcp:8200’
[info] [35m[UiAutomator2][39m Restoring hidden api policy to the device default configuration
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell settings delete global hidden_api_policy_pre_p_apps’[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell settings delete global hidden_api_policy_p_apps’
[debug] [35m[ADB][39m Running ‘C:\Program Files\Android\android-sdk\platform-tools\adb.exe -P 5037 -s c7adc19 shell settings delete global hidden_api_policy’[debug] [35m[Instrumentation][39m Time: 66.092
[debug] [35m[Instrumentation][39m
[debug] [35m[Instrumentation][39m OK (1 test)
[debug] [35m[Instrumentation][39m The process has exited with code 0

写回答

1回答

Mushishi

2020-07-11

] to [POST http://127.0.0.1:8200/wd/hub/session/a41102ee-41ca-471c-a99d-7110f083d6dc/touch/perform] with body: {“startX”:972,“startY”:1065,“endX”:108,“endY”:1065,“steps”:22}[debug] [35m[WD Proxy][39m Got response with status 200: {“sessionId”:“a41102ee-41ca-471c-a99d-7110f083d6dc”,“value”:null}

通过日志看你这个是执行了的,只是可能你界面没看到效果。你把你的滑动坐标,写死,就从700到200 这种直接滑动 看一下效果

0
0

Python主讲移动端自动化测试框架Appium

APP自动化基础知识、po模型、关键字模型、服务自动化、持续集成

1508 学习 · 1333 问题

查看课程