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,

Using “Swipe to element (vertically)” , but swipe did not work. I want to scroll down, Parameter passed UP, retry-2. Anything missing.

Swipe to element not working. I want to scroll down, Parameter passed UP, retry-2. Anything missing.

Hi @vibhorsharma,

Can you please show me the parameters you used in this step?

I want to scroll down to tap next button. The element that i m trying to click is not visible in untill scoll down. Its Android device with native app


Hi @vibhorsharma,

Try to set the BottomMargin to 40 and the TopMargin to 45. Also, increase the timeout to 15000. You selected 30 milliseconds and it’s too low.

Let me know if it helped :wink:

Kind regards,

Adding Margin it worked!

You’re welcome @vibhorsharma :slight_smile:
Let me know if you’ll need my help in the future.

Lind regards,

Didn’t work for me. Please help me on this. Using below:
BottomMargin to 40 and the TopMargin to 45 and timeout is 15000.