Python3调用滑屏函数报这个错是什么原因啊,已经降低过selenium的版本了还是不行

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

慕斯卡4597239

2019-07-30

selenium.common.exceptions.WebDriverException: Message: Parameters were incorrect. We wanted {“wrap”:“actions”,“required”:[“actions”]} and you sent [“gestures”,“sessionId”]

代码:from appium import webdriver

def get_driver():
capabilities = {
“platformName”: “Android”,
“deviceName”: “29913571”,
“app”: “C:\Users\gaoxiaolu\Documents\WeChat Files\Gxl9683\FileStorage\File\2019-07\app-release(4).apk”,
# “appActivity”: “cn.com.open.mooc.index.splash.GuideActivity”
}
driver1 = webdriver.Remote(“http://127.0.0.1:4723/wd/hub”, capabilities)
return driver1

driver = get_driver()

获取屏幕的大小

def get_size():
# 获取屏幕的宽和高
# driver = get_driver()
size = driver.get_window_size()
width = size[‘width’]
height = size[‘height’]
return width, height

def swipe_left():
# 起始点
# driver = get_driver()
x1 = get_size()[0] / 10 * 9
y1 = get_size()[1] / 2

# 结束点,纵坐标不变
x = get_size()[0] / 10
driver.swipe(x1, y1, x, y1)

向右滑动

def swipe_right():
# 起始点
# driver = get_driver()
x1 = get_size()[0] / 10
y1 = get_size()[1] / 2

# 结束点,纵坐标不变
x = get_size()[0] / 10 * 9
driver.swipe(x1, y1, x, y1)

向上滑动

def swipe_up():
# 起始点
# driver = get_driver()
x1 = get_size()[0] / 2
y1 = get_size()[1] / 10 * 9

# 结束点,横坐标不变
y = get_size()[1] / 10
driver.swipe(x1, y1, x1, y)

向下滑动

def swipe_down():
# 起始点
# driver = get_driver()
x1 = get_size()[0] / 2
y1 = get_size()[1] / 10

# 结束点,横坐标不变
y = get_size()[1] / 10 * 9
driver.swipe(x1, y1, x1, y)

将所有的动作封装

def swipe_on(direction):
if direction == ‘up’:
swipe_up()
elif direction == ‘down’:
swipe_down()
elif direction == ‘left’:
swipe_left()
else:
swipe_right()

swipe_on(‘left’)
swipe_on(‘left’)
swipe_on(‘right’)
swipe_on(‘left’)

日志:[HTTP] --> POST /wd/hub/session
[HTTP] {“desiredCapabilities”:{“platformName”:“Android”,“deviceName”:“29913571”,“app”:“C:\Users\gaoxiaolu\Documents\WeChat Files\Gxl9683\FileStorage\File\2019-07\app-release(4).apk”},“requiredCapabilities”:{}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{“platformName”:“Android”,“deviceName”:“29913571”,“app”:“C:\Users\gaoxiaolu\Documents\WeChat Files\Gxl9683\FileStorage\File\2019-07\app-release(4).apk”},{},null]
[BaseDriver] Event ‘newSessionRequested’ logged at 1564478113286 (17:15:13 GMT+0800 (中国标准时间))
[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=UiAutomator1’ by default and using the
[Appium] UiAutomator1 Driver
[Appium]
[Appium] The next minor version of Appium (1.14.x) will set
[Appium] ‘automationName=UiAutomator2’ by default and use the UiAutomator2
[Appium] 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] If you are happy with ‘UiAutomator1’ and do not wish to upgrade
[Appium] Android drivers, please add ‘automationName=UiAutomator1’ to your
[Appium] 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]
[Appium] Setting automation to ‘UiAutomator1’.
[Appium] Appium v1.13.0 creating new AndroidDriver (v4.15.1) session
[Appium] Capabilities:
[Appium] platformName: Android
[Appium] deviceName: 29913571
[Appium] app: C:\Users\gaoxiaolu\Documents\WeChat Files\Gxl9683\FileStorage\File\2019-07\app-release(4).apk
[BaseDriver] Creating session with MJSONWP desired capabilities: {“platformName”:“Android”,"…
[BaseDriver] Session created with session id: 4f2608b2-86e1-4bc1-92bb-11eb985b6289
[ADB] Found 1 ‘build-tools’ folders under ‘C:\android-sdk\android-sdk-windows’ (newest first):
[ADB] C:/android-sdk/android-sdk-windows/build-tools/29.0.1
[ADB] Using ‘adb.exe’ from ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe’
[AndroidDriver] Retrieving device list
[ADB] Trying to find a connected android device
[ADB] Getting connected devices…
[ADB] 1 device(s) connected
[AndroidDriver] Using device: 29913571
[ADB] Using ‘adb.exe’ from ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe’
[ADB] Setting device id to 29913571
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell getprop ro.build.version.sdk’
[ADB] Current device property ‘ro.build.version.sdk’: 23
[ADB] Device API level: 23
[AndroidDriver] Consider setting ‘automationName’ capability to ‘uiautomator2’ on Android >= 6, since UIAutomator framework is not maintained anymore by the OS vendor.
[BaseDriver] Using local app ‘C:\Users\gaoxiaolu\Documents\WeChat Files\Gxl9683\FileStorage\File\2019-07\app-release(4).apk’
[AndroidDriver] Checking whether app is actually present
[AndroidDriver] Starting Android session
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 wait-for-device’
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell echo ping’
[AndroidDriver] Pushing settings apk to device…
[ADB] Getting install status for io.appium.settings
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell dumpsys package io.appium.settings’
[ADB] ‘io.appium.settings’ is installed
[ADB] Getting package info for ‘io.appium.settings’
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell dumpsys package io.appium.settings’
[ADB] Using ‘aapt.exe’ from ‘C:\android-sdk\android-sdk-windows\build-tools\29.0.1\aapt.exe’
[ADB] The version name of the installed ‘io.appium.settings’ is greater or equal to the application version name (‘2.14.0’ >= ‘2.14.0’)
[ADB] 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’
[ADB] Getting IDs of all ‘io.appium.settings’ processes
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell ‘pgrep --help; echo $?’’
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell pgrep -f io\.appium\.settings’
[AndroidDriver] Granting android.permission.SET_ANIMATION_SCALE, CHANGE_CONFIGURATION, ACCESS_FINE_LOCATION by pm grant
[ADB] Granting permissions [“android.permission.SET_ANIMATION_SCALE”,“android.permission.CHANGE_CONFIGURATION”,“android.permission.ACCESS_FINE_LOCATION”] to ‘io.appium.settings’
[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”,";"]]
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 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] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell am start -W -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000’
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell appops set io.appium.settings android:mock_location allow’
[Logcat] Starting logcat capture
[ADB] Getting device platform version
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell getprop ro.build.version.release’
[ADB] Current device property ‘ro.build.version.release’: 6.0.1
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell wm size’
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell getprop ro.product.model’
[ADB] Current device property ‘ro.product.model’: OPPO R9s
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell getprop ro.product.manufacturer’
[ADB] Current device property ‘ro.product.manufacturer’: OPPO
[AndroidDriver] Parsing package and activity from app manifest
[ADB] Using the alternative activity name detection method because of: Could not find ‘apkanalyzer.bat’ in [“C:\android-sdk\android-sdk-windows\platform-tools\apkanalyzer.bat”,“C:\android-sdk\android-sdk-windows\emulator\apkanalyzer.bat”,“C:\android-sdk\android-sdk-windows\tools\apkanalyzer.bat”,“C:\android-sdk\android-sdk-windows\tools\bin\apkanalyzer.bat”,“C:\android-sdk\android-sdk-windows\build-tools\29.0.1\apkanalyzer.bat”]. Do you have Android Build Tools installed at ‘C:\android-sdk\android-sdk-windows’?
[ADB] Extracting package and launch activity from manifest
[ADB] Package name: ‘com.dianchou.dcw’
[ADB] Main activity name: ‘com.dianchou.dcw.view.core.SplashActivity’
[AndroidDriver] Parsed package and activity are: com.dianchou.dcw/com.dianchou.dcw.view.core.SplashActivity
[ADB] Getting install status for com.dianchou.dcw
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell dumpsys package com.dianchou.dcw’
[ADB] ‘com.dianchou.dcw’ is installed
[ADB] Getting install status for com.dianchou.dcw
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell dumpsys package com.dianchou.dcw’
[ADB] ‘com.dianchou.dcw’ is installed
[ADB] Getting package info for ‘com.dianchou.dcw’
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell dumpsys package com.dianchou.dcw’
[ADB] The version name of the installed ‘com.dianchou.dcw’ is greater or equal to the application version name (‘2.2.9’ >= ‘2.2.9’)
[ADB] There is no need to install/upgrade ‘C:\Users\gaoxiaolu\Documents\WeChat Files\Gxl9683\FileStorage\File\2019-07\app-release(4).apk’
[AndroidDriver] Performing fast reset on ‘com.dianchou.dcw’
[ADB] Getting install status for com.dianchou.dcw
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell dumpsys package com.dianchou.dcw’
[ADB] ‘com.dianchou.dcw’ is installed
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell am force-stop com.dianchou.dcw’
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell pm clear com.dianchou.dcw’
[AndroidDriver] Performed fast reset on the installed ‘com.dianchou.dcw’ application (stop and clear)
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell rm -rf /data/local/tmp/strings.json’
[AndroidDriver] Extracting strings from apk
[AndroidDriver] C:\Users\gaoxiaolu\Documents\WeChat Files\Gxl9683\FileStorage\File\2019-07\app-release(4).apk
[AndroidDriver] undefined
[AndroidDriver] C:\Users\GAOXIA~1\AppData\Local\Temp\com.dianchou.dcw
[ADB] Extracting strings from for language: default
[ADB] Successfully extracted 996 strings from ‘C:\Users\gaoxiaolu\Documents\WeChat Files\Gxl9683\FileStorage\File\2019-07\app-release(4).apk’ resources for ‘(default)’ configuration
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell mkdir -p /data/local’
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 push C:\Users\GAOXIA~1\AppData\Local\Temp\com.dianchou.dcw\strings.json /data/local/tmp’
[AndroidBootstrap] Watching for bootstrap disconnect
[ADB] Forwarding system: 4724 to device: 4724
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 forward tcp:4724 tcp:4724’
[UiAutomator] Starting UiAutomator
[UiAutomator] Moving to state ‘starting’
[UiAutomator] Parsing uiautomator jar
[UiAutomator] Found jar name: ‘AppiumBootstrap.jar’
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell mkdir -p /data/local’
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 push ‘C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-android-driver\bootstrap\bin\AppiumBootstrap.jar’ /data/local/tmp/’
[ADB] Attempting to kill all uiautomator processes
[ADB] Getting IDs of all ‘uiautomator’ processes
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell pgrep -f uiautomator’
[ADB] No ‘uiautomator’ process has been found
[UiAutomator] Starting UIAutomator
[ADB] Creating ADB subprocess with args: ["-P",5037,"-s",“29913571”,“shell”,“uiautomator”,“runtest”,“AppiumBootstrap.jar”,"-c",“io.appium.android.bootstrap.Bootstrap”,"-e",“pkg”,“com.dianchou.dcw”,"-e",“disableAndroidWatchers”,false,"-e",“acceptSslCerts”,false]
[UiAutomator] Moving to state ‘online’
[AndroidBootstrap] Android bootstrap socket is now connected
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell dumpsys window’
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] json loading complete.
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Registered crash watchers.
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Client connected
[AndroidDriver] Screen already unlocked, doing nothing
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell am start -W -n com.dianchou.dcw/com.dianchou.dcw.view.core.SplashActivity -S’
[ADB] Waiting up to 20000ms for activity matching pkg: ‘com.dianchou.dcw’ and activity: ‘com.dianchou.dcw.view.core.SplashActivity’ to be focused
[ADB] Possible activities, to be checked: ‘com.dianchou.dcw.view.core.SplashActivity’, ‘com.dianchou.dcw.com.dianchou.dcw.view.core.SplashActivity’
[ADB] Getting focused package and activity
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell dumpsys window windows’
[ADB] Found package: ‘com.dianchou.dcw’ and fully qualified activity name : ‘com.dianchou.dcw.view.core.SplashActivity’
[Appium] New AndroidDriver session created successfully, session 4f2608b2-86e1-4bc1-92bb-11eb985b6289 added to master session list
[BaseDriver] Event ‘newSessionStarted’ logged at 1564478130302 (17:15:30 GMT+0800 (中国标准时间))
[MJSONWP (4f2608b2)] Cached the protocol value ‘MJSONWP’ for the new session 4f2608b2-86e1-4bc1-92bb-11eb985b6289
[MJSONWP (4f2608b2)] Responding to client with driver.createSession() result: {“platform”:“LINUX”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“platformName”:“Android”,“deviceName”:“29913571”,“app”:“C:\Users\gaoxiaolu\Documents\WeChat Files\Gxl9683\FileStorage\File\2019-07\app-release(4).apk”},“platformName”:“Android”,“deviceName”:“29913571”,“app”:“C:\Users\gaoxiaolu\Documents\WeChat Files\Gxl9683\FileStorage\File\2019-07\app-release(4).apk”,“deviceUDID”:“29913571”,“platformVersion”:“6.0.1”,“deviceScreenSize”:“1080x1920”,“deviceModel”:“OPPO R9s”,“deviceManufacturer”:“OPPO”,“appPackage”:“com.dianchou.dcw”,“appWaitPackage”:“com.dianchou.dcw”,“appActivity”:“com.dianchou.dcw.view.core.SplashActivity”,“appWaitActivity”:“com.dianchou.dcw.view.core.SplashActivity”}
[HTTP] <-- POST /wd/hub/session 200 17026 ms - 921
[HTTP]
[HTTP] --> GET /wd/hub/session/4f2608b2-86e1-4bc1-92bb-11eb985b6289/window/current/size
[HTTP] {}
[MJSONWP (4f2608b2)] Calling AppiumDriver.getWindowSize() with args: [“current”,“4f2608b2-86e1-4bc1-92bb-11eb985b6289”]
[AndroidBootstrap] Sending command to android: {“cmd”:“action”,“action”:“getDeviceSize”,“params”:{}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“action”,“action”:“getDeviceSize”,“params”:{}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: getDeviceSize
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“status”:0,“value”:{“height”:1920,“width”:1080}}
[AndroidBootstrap] Received command result from bootstrap
[MJSONWP (4f2608b2)] Responding to client with driver.getWindowSize() result: {“height”:1920,“width”:1080}
[HTTP] <-- GET /wd/hub/session/4f2608b2-86e1-4bc1-92bb-11eb985b6289/window/current/size 200 70 ms - 100
[HTTP]
[HTTP] --> GET /wd/hub/session/4f2608b2-86e1-4bc1-92bb-11eb985b6289/window/current/size
[HTTP] {}
[MJSONWP (4f2608b2)] Calling AppiumDriver.getWindowSize() with args: [“current”,“4f2608b2-86e1-4bc1-92bb-11eb985b6289”]
[AndroidBootstrap] Sending command to android: {“cmd”:“action”,“action”:“getDeviceSize”,“params”:{}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“action”,“action”:“getDeviceSize”,“params”:{}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: getDeviceSize
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“status”:0,“value”:{“height”:1920,“width”:1080}}
[AndroidBootstrap] Received command result from bootstrap
[MJSONWP (4f2608b2)] Responding to client with driver.getWindowSize() result: {“height”:1920,“width”:1080}
[HTTP] <-- GET /wd/hub/session/4f2608b2-86e1-4bc1-92bb-11eb985b6289/window/current/size 200 10 ms - 100
[HTTP]
[HTTP] --> GET /wd/hub/session/4f2608b2-86e1-4bc1-92bb-11eb985b6289/window/current/size
[HTTP] {}
[MJSONWP (4f2608b2)] Calling AppiumDriver.getWindowSize() with args: [“current”,“4f2608b2-86e1-4bc1-92bb-11eb985b6289”]
[AndroidBootstrap] Sending command to android: {“cmd”:“action”,“action”:“getDeviceSize”,“params”:{}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“action”,“action”:“getDeviceSize”,“params”:{}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: getDeviceSize
[AndroidBootstrap] Received command result from bootstrap
[MJSONWP (4f2608b2)] Responding to client with driver.getWindowSize() result: {“height”:1920,“width”:1080}
[HTTP] <-- GET /wd/hub/session/4f2608b2-86e1-4bc1-92bb-11eb985b6289/window/current/size 200 10 ms - 100
[HTTP]
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“status”:0,“value”:{“height”:1920,“width”:1080}}
[HTTP] --> POST /wd/hub/session/4f2608b2-86e1-4bc1-92bb-11eb985b6289/touch/perform
[HTTP] {“gestures”:[{“action”:“press”,“options”:{“x”:972,“y”:960}},{“action”:“wait”,“options”:{“ms”:0}},{“action”:“moveTo”,“options”:{“x”:108,“y”:960}},{“action”:“release”,“options”:{}}],“sessionId”:“4f2608b2-86e1-4bc1-92bb-11eb985b6289”}
[MJSONWP (4f2608b2)] Encountered internal error running command: BadParametersError: Parameters were incorrect. We wanted {“wrap”:“actions”,“required”:[“actions”]} and you sent [“gestures”,“sessionId”]
[MJSONWP (4f2608b2)] at checkParams (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:206:9)
[MJSONWP (4f2608b2)] at checkParams (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:335:7)
[MJSONWP (4f2608b2)] at asyncHandler (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:489:15)
[MJSONWP (4f2608b2)] at Layer.handle [as handle_request] (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\express\lib\router\layer.js:95:5)
[MJSONWP (4f2608b2)] at next (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\express\lib\router\route.js:137:13)
[MJSONWP (4f2608b2)] at Route.dispatch (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\express\lib\router\route.js:112:3)
[MJSONWP (4f2608b2)] at Layer.handle [as handle_request] (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\express\lib\router\layer.js:95:5)
[MJSONWP (4f2608b2)] at C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\express\lib\router\index.js:281:22
[MJSONWP (4f2608b2)] at param (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\express\lib\router\index.js:354:14)
[MJSONWP (4f2608b2)] at param (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\express\lib\router\index.js:365:14)
[MJSONWP (4f2608b2)] at Function.process_params (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\express\lib\router\index.js:410:3)
[MJSONWP (4f2608b2)] at next (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\express\lib\router\index.js:275:10)
[MJSONWP (4f2608b2)] at logger (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\morgan\index.js:144:5)
[MJSONWP (4f2608b2)] at Layer.handle [as handle_request] (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\express\lib\router\layer.js:95:5)
[MJSONWP (4f2608b2)] at trim_prefix (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\express\lib\router\index.js:317:13)
[MJSONWP (4f2608b2)] at C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\express\lib\router\index.js:284:7
[MJSONWP (4f2608b2)] at Function.process_params (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\express\lib\router\index.js:335:12)
[MJSONWP (4f2608b2)] at next (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\express\lib\router\index.js:275:10)
[MJSONWP (4f2608b2)] at C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\body-parser\lib\read.js:130:5
[MJSONWP (4f2608b2)] at invokeCallback (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\raw-body\index.js:224:16)
[MJSONWP (4f2608b2)] at done (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\raw-body\index.js:213:7)
[MJSONWP (4f2608b2)] at IncomingMessage.onEnd (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\raw-body\index.js:273:7)
[MJSONWP (4f2608b2)] at IncomingMessage.emit (events.js:182:13)
[MJSONWP (4f2608b2)] at endReadableNT (_stream_readable.js:1090:12)
[MJSONWP (4f2608b2)] at process._tickCallback (internal/process/next_tick.js:63:19)
[MJSONWP] Bad parameters: BadParametersError: Parameters were incorrect. We wanted {“wrap”:“actions”,“required”:[“actions”]} and you sent [“gestures”,“sessionId”]
[HTTP] <-- POST /wd/hub/session/4f2608b2-86e1-4bc1-92bb-11eb985b6289/touch/perform 400 42 ms - 116
[HTTP]
[BaseDriver] Shutting down because we waited 60 seconds for a command
[AndroidDriver] Shutting down Android driver
[Appium] Closing session, cause was ‘New Command Timeout of 60 seconds expired. Try customizing the timeout using the ‘newCommandTimeout’ desired capability’
[Appium] Removing session 4f2608b2-86e1-4bc1-92bb-11eb985b6289 from our master session list
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell am force-stop com.dianchou.dcw’
[ADB] Pressing the HOME button
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell input keyevent 3’
[AndroidBootstrap] Sending command to android: {“cmd”:“shutdown”}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“shutdown”}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type SHUTDOWN
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“status”:0,“value”:“OK, shutting down”}
[AndroidBootstrap] Received command result from bootstrap
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Closed client connection
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: numtests=1

[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=.

[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner

[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: test=testRunServer

[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap

[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: current=1

[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS_CODE: 0

[UiAutomator] Shutting down UiAutomator
[UiAutomator] Moving to state ‘stopping’
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=

[AndroidBootstrap] [UIAUTO STDOUT] Test results for WatcherResultPrinter=.

[AndroidBootstrap] [UIAUTO STDOUT] Time: 66.154

[AndroidBootstrap] [UIAUTO STDOUT] OK (1 test)

[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS_CODE: -1

[UiAutomator] UiAutomator shut down normally
[UiAutomator] Moving to state ‘stopped’
[ADB] Attempting to kill all uiautomator processes
[ADB] Getting IDs of all ‘uiautomator’ processes
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell pgrep -f uiautomator’
[ADB] No ‘uiautomator’ process has been found
[UiAutomator] Moving to state ‘stopped’
[Logcat] Stopping logcat capture
[ADB] Running ‘C:\android-sdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s 29913571 shell am force-stop io.appium.unlock’
[AndroidDriver] Not cleaning generated files. Add clearSystemFiles capability if wanted.

写回答

1回答

Mushishi

2019-07-30

你得前后日志都发,还有你代码,这个看着是你传递参数问题,你试着swipe不去传递时间

0
2
Mushishi
回复
慕斯卡4597239
更新一下appium python client
2019-10-04
共2条回复

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

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

1508 学习 · 1333 问题

查看课程