Loop
In this section, we will guide you on how to use the Loop
step.
Purpose
This step is used to execute a group of sub-steps in a loop. It is an essential step for extracting webpage list data in workflows, and it serves as the foundation for operations such as loop pagination, loop scrolling, and loop dropdown option switching. Learning how to configure loops properly is crucial for extracting appropriate data.
Configuration
General
Step Name: Custom step name.
Loop Method: Select the type of loop to perform.
Loop by Count: Set the loop to execute for a specific number of times, ending when the count is reached.
Infinite Loop: Set the loop to execute continuously unless a
Break Loop
step is encountered.
Loop List: Set the loop to execute for each item in a list, from the first item to the last item.
List Type: Set the type of list to loop through, different types are suitable for different scenarios.
- URL List: Set a list of URLs, click the settings icon on the right to edit.
- Text List: Set a list of texts, click the settings icon on the right to edit.
- Element List: Set a list of elements, click the settings icon on the right to edit.
List Preview: Preview the first 100 items of the list. Clicking different items affects steps within the loop that use loop list items.
TIP
The selection feature only works in the editor, mainly used for switching between different loop list items to debug and run sub-steps, comparing if the execution results meet expectations.
Loop Similar Elements: Set the loop list as a group of similar elements on the webpage, such as article lists, image lists, product lists, etc. They can be located using the same XPath expression.
- Loop Pagination: Set the loop for special pagination execution, working with dedicated
Click Element
sub-steps. This type of loop is suitable for scenarios that require continuous simulation of clicking next page or load more buttons.
- Loop Scrolling: Set the loop for special scrolling execution, working with dedicated
Scroll
sub-steps. This type of loop is suitable for scenarios that require continuous simulation of page scrolling.
- Loop Dropdown: Set the loop for special dropdown option switching execution, working with dedicated
Set Dropdown
sub-steps. This type of loop is suitable for scenarios that require continuous switching between different dropdown options.
Advanced
INFO
Advanced configuration is currently only available when the loop method is set to Loop Similar Elements
.
- Auto Skip Duplicates: When enabled, for infinite scrolling lists, it will actively skip list items that have already been processed for data extraction, reducing the amount of duplicate data in the final extraction and speeding up the overall execution of the loop step.