TestProject Forum
Powered by leading experts in the test automation community

How can I swipe up and down on Android test

I’m trying to find a way to swipe up/down without using coordinates. Is it possible??
Up until now, I’ve only used the mouse option to manually swipe, but I don’t want to use coordinates.


Hi maxsh!

You are right, the better and safer thing to do is not using the swipe gesture with coordinates. It will work with the device that you are recording with, but if you will execute this test on other devices with a different dimension, it might not work.

The better and safer option is to use the actions from the “Swipe & Search for Element”. This addon provides actions to swipe vertically/horizontally until the requested element is found. You can also control the direction, margins (bottom & top), number of swipes and the timeout.

Hi Amit,

I sent you an email under separate cover. So, what “Addon” do I need to add to my project in order to get “Swipe & Search for Element”? I did find the package “Swipe and Find Element” in TestProject Addon Platform. When I invoke/open the Addon, I only find “Make a Swipe gesture from (x1, y1) to (x2. y2)” and not able to find any function call with the possibility to add the Element name (example: Outlook). Please advise. Thank you.

Hi @Wamiq.Sattar,

The actions of the “Swipe & Search for Element” addon, are element actions. They are performed on a specific element. Therefore, You need to locate the element that you want to find and apply the requested action on it. For example, if you want to scroll up to find an element that is located at the bottom of the page, you can use the action “Swipe to element (vertically)” and try to locate this element.

Kind regards,