Can not Scroll android application screen using appium python [Solved]

Hi,
I am trying to automate an application using appium. Scripting language I am using is Python.
In this application there are 13 rows in total and in the first screen it shows only 7 rows. So for others, I have to use scroll function and for each row elements are changing dynamically. Can anyone have any idea how can I use scroll function here? I have tried in few ways:

el1 = driver.find_element_by_xpath("//[@com.cloudapper.android:id/textViewName=]"[7])
el2 = driver.find_element_by_xpath("//
[@com.cloudapper.android:id/textViewName=]"[12])
driver.scroll(el1, el2)

Another way I have tried is to collect element ID of all the list. But it only showing ID which are present in visible screen.

Notes: I have checked other post of this forum but could not help. I am adding my app first screen from where I want to scroll up.

Img-11

1 Like

Thanks for your reply. I am checking out the tutorial.

Thanks. This tutorial helped me a lot to learn few more things as well. :slightly_smiling_face:

I have solved this problem by adding below codes: (If anyone can get help from this)
menuItems = driver.find_elements_by_id(“ElementID”)
actions = TouchAction(driver)
actions.press(x=478, y=1797) .move_to(x=542, y=562) .release() .perform()

Thanks @Tahmina_TA, but does it worked on Android with Python as well?
As of now I’m using javascript for Android scrolling:
self.driver.find_element_by_android_uiautomator("new UiScrollable(new UiSelector()).scrollIntoView(text(\"Enter name\"))")