Hello,
let’s say that an application contains a table with a scrollbar.
The table only displays a few items at a time. To see items further down, you need to scroll down.
Let’s say I’m looking for item N (whose label is “ABC”) in a list of 10 items, which is not visible at first in the table. To see it, I need to scroll down a few times.
How do you automate search for item N?
Which Activity should you use?
Many thanks.
To automate the search for item N in a table with a scrollbar, you can follow this approach in UiPath:
-
Find the item in the table:
- You can use the “Find Element” or “Find Text” activity to check for the presence of item N (e.g., “ABC”) in the visible area of the table.
-
Scroll down:
- If the item isn’t visible, use a “Scroll” activity to scroll the table down. You can also use “Send Hotkey” to simulate pressing the “Page Down” or “Arrow Down” keys to scroll.
-
Repeat search and scroll:
- Use a “While” or “Do While” loop to continue searching for the item and scrolling until the item is found or you reach the end of the table. You can check for the presence of the item after each scroll and stop when it’s found.
-
Handle end of the list:
- If necessary, you can add logic to handle the case when you reach the end of the table (e.g., by detecting that no new items appear when scrolling).
Example Activities to Use:
- “Find Element” or “Find Text”: To detect if item N is visible in the current view.
- “Scroll” or “Send Hotkey”: To scroll down and bring more items into view.
- “Do While” or “While”: To loop through the process of searching and scrolling.
- “Element Exists” or “Find Children”: To check if the item is part of the list when scrolling.
Basic Workflow:
- Use “Find Element” to check for “ABC” in the visible area.
- If not found, use “Scroll” or “Send Hotkey” (like “Page Down”).
- Repeat this until the item is found.
This approach should help you automate searching for item N, even if it’s located further down the list in a scrollable table.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.