Scroll Down using appium

Hello, can some one tell me how to scroll down with appium - Python?

I have managed to do it with selendroid, but when i use the same method (see method below) with appium im getting this Webdriver Exception:

method used: touch.flick_element(entry_fee_filter_first, swipe_value, 0, 0).perform()

Traceback (most recent call last):
File “C:\Users\QA\PycharmProjects\BantasyTestSuite\”, line 2058, in runTest
touch.flick_element(entry_fee_filter_first, swipe_value, 0, 0).perform()
File “C:\Python27\lib\site-packages\selenium\webdriver\common\”, line 46, in perform
File “C:\Python27\lib\site-packages\selenium\webdriver\common\”, line 183, in
‘speed’: int(speed)}))
File “C:\Python27\lib\site-packages\selenium\webdriver\remote\”, line 196, in execute
File “C:\Python27\lib\site-packages\appium\webdriver\”, line 29, in check_response
raise wde
WebDriverException: Message: unknown error: ‘speed’ must be a positive integer
(Session info: chrome=44.0.2403.117)
(Driver info: chromedriver=2.15.322455 (ae8db840dac8d0c453355d3d922c91adfb61df8f),platform=Mac OS X 10.10.5 x86_64)

I forgot to tell that my app is hybrid. Testing on Android.

I have not worked on Python but following steps should accomplish this:

  1. Try to get the context for web view since your app is hybrid. So you might need to switch the driver context on the fly depending upon you are using native part of web view in the app
  2. Scrolling needs source and destination points (Point Class in java). So you need to swipe from one point to point 2 to scroll up or down. Touch class is also used for the same purpose. There is swipe method which can help you out in scrolling.

Hope it helps.

I switch to the webview context always, also i have tried Appium Touch Actions, but neither of them are working for me (swipe, moveTo, etc)

Im getting this error:

Traceback (most recent call last):
File “”, line 27, in, y=-500).release().perform()
File “C:\Python27\lib\site-packages\appium\webdriver\common\”, line 94, in perform
self._driver.execute(Command.TOUCH_ACTION, params)
File “C:\Python27\lib\site-packages\selenium\webdriver\remote\”, line 196, in execute
File “C:\Python27\lib\site-packages\appium\webdriver\”, line 24, in check_response
super(MobileErrorHandler, self).check_response(response)
File “C:\Python27\lib\site-packages\selenium\webdriver\remote\”, line 103, in check_response
status = value[‘status’]
TypeError: string indices must be integers

Try the above link which has example in JAVA

Please use Appiumdriver instead of webdriver. that will solve your issue.

I never heard of appiumdriver, how can i include the appiumdriver using python?

Not sure about python , But in Java I am using globally Appiumdriver in a way like :
public static AppiumDriver driver;