"MOBILE_SWIPE" Command

Description: This command is used to perform swipe operation on a mobile widget using a mobile locator. Swipe to a locator allows you to use an end point for the swipe which is defined in a mobile locator. Direction allows you to control the direction of the swipe (Up, Down, Left, Right) and Offset points allows you to specify the amount of the swipe.

Usage Scenario: Suppose we want to swipe to the left by 450 points on Wikipedia app in the “In the news” section highlighted below:

Procedure: Define steps that run/load Wikipedia app and define a mobile locator for the card list highlighted above. The XPath below was used for the purposes of demonstration in this example:

org.wikipedia:id/view_list_card_list

Your step will look like this:

image-20241113-124215.png

After swiping to the left, you will notice that the original image was moved to the left to indicate swipe direction by 450 points.