Ask Swarmbot AI to search a long list: stop when the item appears or the list ends
Give the Swarmbot script assistant a starting screen, target label, scroll area, and clear stopping rules. Check the found item before adding a tap.
Swarmbot can save a repeated search through a phone app's long list as a script. This guide is for people who want Swarmbot AI to help write that search. Open the project in Swarmbot's script development view, choose one authorized test device, and leave the app at the start of the list. Ask the script assistant to find and report the item first; add a tap only after you have checked the match.
Describe the item and the part of the screen that scrolls
“Scroll down until you find it and tap” leaves too many decisions open. Tell AI which app page is showing, what text identifies the item, whether similar items can appear, and which area is the list. If the page has a filter, group, or search field, say whether the script should use that first. A long scroll may not be needed at all.
Here is an example request you can adapt:
The test phone is on the sample app's asset list. Find the card titled “Example Image A.” Search only by scrolling the list area; do not swipe the top navigation or bottom buttons. Check visible cards first, then use text finding and scrolling from the current Swarmbot script documentation in small steps. When you find a match, report the title and location for me to check. Do not tap. Stop and tell me if two cards have that title, the page changes, a sign-in prompt appears, or the end of the list is clear. If the end cannot be identified reliably, stop after a limited search and ask me rather than scrolling forever.
Finding the target and deciding it is absent are different outcomes. A list may load more items or show a genuine empty state. After each scroll, check whether the screen changed before continuing. Android's UI testing guidance uses a similar idea of scrolling until a condition or the end is reached. The actual script here should use Swarmbot's current functions, not code copied from another tool.
Give AI three clear reasons to stop
First, stop scrolling when one item matches the target and its surrounding context. Show the result before acting. Second, stop on a clear end of list, page error, or sign-in screen; another swipe is not a solution to those states. Third, when the app gives no reliable end marker, stop within the limited search range you set and report “not found.” A limit defines how far to inspect; it does not imply the item exists.
Swarmbot's current script runtime includes text finding and screen swipes. Ask AI to check their parameters in the current function documentation, then build a small sequence: inspect the screen, scroll if needed, inspect again. Do not put opening the list, submitting a search, or tapping a card inside that repeated search. The script's result should distinguish found, not found, and page changed.
Test the search without a tap
Have the first version report the target text and position. Compare that result with the phone screen. If several items share the same title, provide a nearby label or group; do not accept the first match by default. Once the search is correct, add the tap and a check of the next page as a separate change. If the list uses image cards with unreliable labels, see when to use text or an image crop. If the issue is simply loading time, see the guide to state-based waits. This guide addresses when a long-list search should continue and when it should stop.