I want to stop the action after the drop-down, so i write down this code but it didn’t work, help plz~~
Version 1.4.13 (Draco)/Python 2.7/mac 10.12.2/Android 4.4
def new_swipe_to_down(self,during=None):
"""Swipe from one point to another point, for an optional duration.
:Args:
- start_x - x-coordinate at which to start
- start_y - y-coordinate at which to start
- end_x - x-coordinate at which to stop
- end_y - y-coordinate at which to stop
- duration - (optional) time to take the swipe, in ms.
:Usage:
driver.swipe(100, 100, 100, 400)
"""
windowSize = self.getWindowSize()
width = windowSize.get('width')
height = windowSize.get('height')
action = TouchAction(self.driver)
action \
.press(x=width/2, y=height/4) \
.move_to(x=width/2, y=height*3/4) \
.wait(ms=during) \
.release() \
.perform()
Traceback (most recent call last):
File "../../public/saveScreen.py", line 20, in wrapper
return func(*args, **kwargs)
File "/Users/jianghekun/invest-app-android/testcases/index/test_index.py", line 286, in test_index_refresh_info
Index.new_swipe_to_down(5000)
File "../../pageobject/BasePage.py", line 87, in new_swipe_to_down
.move_to(x=width/2, y=height*3/4) \
File "/Library/Python/2.7/site-packages/appium/webdriver/common/touch_action.py", line 94, in perform
self._driver.execute(Command.TOUCH_ACTION, params)
File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 201, in execute
self.error_handler.check_response(response)
File "/Library/Python/2.7/site-packages/appium/webdriver/errorhandler.py", line 29, in check_response
raise wde
WebDriverException: Message: None