pagination Scenario 1 — Paginated List with Next Button
Written by RTILA X Engineering Team
What You'll Learn
Navigate through paginated lists
Real-World Use Case
Collecting multi-page search results
Paginated List with Next Button
A three-page list; the while loop clicks Next until no pages remain.
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/10Paginated Items
| title | description |
|---|---|
| Result 1 | The first paginated search result available on this demonstration page. |
| Result 2 | The second paginated search result available on this demonstration page. |
| Result 3 | The third paginated search result available on this demonstration page. |
| Result 4 | The fourth paginated search result available on this demonstration page. |
| Result 5 | The fifth paginated search result available on this demonstration page. |
| Result 6 | The sixth paginated search result available on this demonstration page. |
| Result 7 | The seventh paginated search result available on this demonstration page. |
| Result 8 | The eighth paginated search result available on this demonstration page. |
| Result 9 | The ninth paginated search result available on this demonstration page. |
| Result 10 | The tenth paginated search result available on this demonstration page. |
| Result 11 | The eleventh paginated search result available on this demonstration page. |
| Result 12 | The twelfth paginated search result available on this demonstration page. |
| Result 13 | The thirteenth paginated search result available on this demonstration page. |
| Result 14 | The fourteenth paginated search result available on this demonstration page. |
| Result 15 | The fifteenth paginated search result available on this demonstration page. |
| Result 16 | The sixteenth paginated search result available on this demonstration page. |
| Result 17 | The seventeenth paginated search result available on this demonstration page. |
| Result 18 | The eighteenth paginated search result available on this demonstration page. |
| Result 19 | The nineteenth paginated search result available on this demonstration page. |
| Result 20 | The twentieth paginated search result available on this demonstration page. |
| Result 21 | The twenty-first paginated search result available on this demonstration page. |
| Result 22 | The twenty-second paginated search result available on this demonstration page. |
| Result 23 | The twenty-third paginated search result available on this demonstration page. |
| Result 24 | The twenty-fourth paginated search result available on this demonstration page. |
| Result 25 | The twenty-fifth paginated search result available on this demonstration page. |
| Result 26 | The twenty-sixth paginated search result available on this demonstration page. |
| Result 27 | The twenty-seventh paginated search result available on this demonstration page. |
| Result 28 | The twenty-eighth paginated search result available on this demonstration page. |
| Result 29 | The twenty-ninth paginated search result available on this demonstration page. |
| Result 30 | The thirtieth paginated search result available on this demonstration page. |
RTILA X Automation Project
{
"name": "Extract_Paginated_List",
"settings": {
"urls": [
"https://learn.rtila.com/scenarios/pagination/1"
]
},
"datasets": {
"page_items": {
"item_selector": "css=.page-item",
"properties": [
{
"name": "title",
"type": "text",
"selector": "css=.item-title"
},
{
"name": "description",
"type": "text",
"selector": "css=.item-desc"
}
]
}
},
"commands": [
{
"command": "extract_data",
"params": {
"dataset": "page_items"
}
},
{
"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": "page_items"
}
}
]
}
}
]
} This scenario exercises the while loop together with a wait_for_selector guard. Each iteration extracts the visible list items, clicks the Next link, and waits for the page to settle before extracting again.
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 3 RTILA X commands and is referenced in 2 learning articles.
Continue Learning
Was this helpful?
Thank you for your feedback!