Loop Elements
Iterate through multiple web elements
The Loop Elements block allows you to process multiple elements on a webpage, such as product listings, comments, or any repeating content. Use it to scrape data, click through items, or handle dynamic content.
Inputs
☐ Description (Optional)
A brief note explaining what elements this loop will process.
Good Examples:
- “Extract all product prices from search results”
- “Click through each pagination link”
- “Process all comments on the page”
☐ Element Selection (Required)
Choose how to identify the elements to loop through:
CSS Selector or XPath
Description: Define which elements to process on the page.
Features:
☐ Use CSS selectors (e.g., .product-card
)
☐ Use XPath expressions
☐ Match multiple elements at once
Example Use Case:
Select all product cards with class .product-card
☐ Load More Elements (Optional)
Configure how to handle dynamically loaded content:
Click Element
Description: Click a button or link to load more items.
Settings:
☐ Element to click (e.g., “Load More” button)
☐ Wait time after clicking
☐ Maximum attempts to load more
Example Use Case: Click “Show More” button to load additional comments
Scroll Action
Description: Scroll the page to trigger lazy loading.
Settings:
☐ Scroll direction (up/down)
☐ Wait time after scrolling
☐ Scroll to top/bottom option
Example Use Case: Scroll down to load more products in infinite scroll
Next Page
Description: Navigate through paginated content.
Settings:
☐ Next page link selector
☐ Wait time for page load
☐ Maximum pages to process
Example Use Case: Click through search result pages
Usage Examples
1. Product Scraping
.product-item
2. Blog Articles
.article-item
.next-page
3. Comment Processing
.comment-item
.show-more-comments
4. Message History
.message
5. Social Media Feed
.post-container
6. Review Collection
.review-box
.load-more-reviews
Notes
- Test selectors to ensure they match the correct elements
- Set appropriate wait times for dynamic content
- Consider using Loop Breakpoint during testing
- Handle errors when elements fail to load