Recording a Swipe Until Step

Updated by Kashif Hussain

Swipe Until is a powerful feature of Sofy's No Code Automation that you can take advantage of while you are recording a test. To cater to different devices and screen sizes when you need to automate swipes, you’ve probably noticed that the number of swipes is a dynamic attribute. This makes performing the same automated test on multiple different devices difficult, as the test will likely fail on any device where more or less swipes are required to find and select the element you specified.

However, you can now specify while recording a test that you’d like the system to swipe up or down on a selected page until it finds the specified element. The system also keeps a tally of the number of swipes that it can incorporate as the maximum number of swipes you’d like the system to make before the test fails. You can also set your own preference for the maximum number of swipes.

When a test is executed, the system will now swipe through the app until the specified element is found, resulting in a successful execution, or the maximum number of swipes being exhausted, resulting in a failed test. This allows you to boost your productivity by cutting down on repetitive swipes through specification of a stopping condition, all without the extra steps of having to specify this after saving your test case and editing offline.

Adding a Swipe Until Action While Recording a Test (Setup)

  1. Log in to your Sofy account.
  2. Select your desired application.

Highlighting application dropdown to choose from the set of applications in your account.
  1. From Device Lab, acquire a device with which you would like to record your test
  2. Once your device has set up, you can choose to begin recording a test from the dropdown menu highlighted here
Highlighting the action tab to select to begin recording a new test.

  1. You may now start recording after choosing 'Start Fresh'.

Swipe Until Step

Please watch this attached short video on a simplified walkthrough of how you can add a Swipe Until step during recording - Swipe Until While Recording A Test.

We will also break this process down here:

  1. As you begin recording, you will see the Swipe Until icon in the column next to the device

Highlighting the new Swipe Until button visible in the icon column during recording.
  1. Once you click on it, you will see the Swipe Until menu showing fields for Maximum number of swipes as well as attribute fields for the element you would like as the stopping condition (i.e. when the system sees this element on the screen, no more swipes will occur). When you swipe after enabling the Swipe Until menu, the maximum number of swipes will automatically increment to match how many swipes you perform.
  2. Upon locating the element on screen that you wish to use as the stopping condition, you can click on the element and its attributes will be captured by the system. You must then enable which attributes you would like to use. You can also manually set the maximum number of swipes. Once these fields have been added, you can click on the Add Swipe Until Step button as shown.

Highlighting the UI for the Swipe Until button exhibiting Maximum Number of Swipes field as well as Element Attribute fields to select stopping-condition element.

  1. The saved step will now appear in your list of recorded steps as shown below.

Highlighting the successful addition of a Swipe Until step.

  1. It is important to note that if you cancel the Swipe Until action as shown in Step 3 of this list, you will see the warning "Canceling swipe until will not revert the screens". This means that any swipes you had performed while in Swipe Until mode during recording affected the test flow and you will need to revert the flow back to the original (before the swipes) if you want to maintain the test flow.

Important warning: Canceling a Swipe until Step does not revert the screens.

Now, you are all ready to start using Swipe Until during test recordings, saving you the time of having to do this only after recording the test. The system's ability to extract all the necessary attributes for a stopping-condition element also saves you the hassle of inputting the fields manually. We aim to make this process as easy and intuitive for you as possible.

Should you have any concerns or queries, please do not hesitate to reach out to our customer support at customersupport@sofy.ai. We will promptly help you out with any demonstrations or questions you would like answered.


How did we do?