pagination Scenario 2 — Paginated Search Results
Written by RTILA X Engineering Team
What You'll Learn
Scroll to load more content dynamically
Real-World Use Case
Extracting data from infinite-scroll feeds
Result 1
The first paginated search result available on this demonstration page.
/scenarios/pagination/result/1Result 2
The second paginated search result available on this demonstration page.
/scenarios/pagination/result/2Result 3
The third paginated search result available on this demonstration page.
/scenarios/pagination/result/3Result 4
The fourth paginated search result available on this demonstration page.
/scenarios/pagination/result/4Result 5
The fifth paginated search result available on this demonstration page.
/scenarios/pagination/result/5Result 6
The sixth paginated search result available on this demonstration page.
/scenarios/pagination/result/6Result 7
The seventh paginated search result available on this demonstration page.
/scenarios/pagination/result/7Result 8
The eighth paginated search result available on this demonstration page.
/scenarios/pagination/result/8Result 9
The ninth paginated search result available on this demonstration page.
/scenarios/pagination/result/9Result 10
The tenth paginated search result available on this demonstration page.
/scenarios/pagination/result/10
{
"name": "Extract_Paginated_Search",
"settings": {
"urls": [
"https://learn.rtila.com/scenarios/pagination/2"
],
"headless": false,
"navigation_timeout": 30000,
"max_concurrent_workers": 1,
"humanoidEnabled": true,
"humanoidSensitivity": "medium"
},
"datasets": {
"search_results": {
"item_selector": "css=.page-item",
"properties": [
{
"name": "title",
"type": "text",
"selector": "css=.item-title"
},
{
"name": "price",
"type": "text",
"selector": "css=.item-price"
}
]
}
},
"commands": [
{
"command": "goto",
"params": {
"url": "https://learn.rtila.com/scenarios/pagination/2"
}
},
{
"command": "wait_for_selector",
"params": {
"selector": "css=.page-item"
}
},
{
"command": "extract_data",
"params": {
"dataset": "search_results"
}
},
{
"command": "while",
"params": {
"condition": {
"type": "element_visible",
"selector": "css=a.next-page:not(.disabled)"
},
"do": [
{
"command": "click",
"params": {
"selector": "css=a.next-page"
}
},
{
"command": "wait_for_load_state",
"params": {
"state": "networkidle"
}
},
{
"command": "extract_data",
"params": {
"dataset": "search_results"
}
}
]
}
}
]
}
This scenario introduces a simulated 10-page search result set. The while loop continues until the Next link is disabled, allowing the automation to collect results from every page without knowing the exact page count in advance.
Did you complete this scenario?
Ready to run this automation?
Copy the project JSON above, open RTILA X, create a new project, and paste it.
This scenario covers 2 RTILA X commands and is referenced in 1 learning article.
Continue Learning
Was this helpful?
Thank you for your feedback!