dynamic-content Scenario 4 — Virtual Scroll Container Extraction
Written by RTILA X Engineering Team
Intermediate ~6 min
Prerequisites: dynamic-content/1 dynamic-content/2
What You'll Learn
Scroll a container to trigger virtual scroll loads
Real-World Use Case
Scraping infinite-scroll dashboards
LIVE DEMO
Item 11
Item 22
Item 33
Item 44
Item 55
Item 66
Item 77
Item 88
Item 99
Item 1010
EXPECTED OUTPUT
RTILA X PROJECT JSON
{
"name": "Extract_Virtual_Scroll_Items",
"settings": {
"urls": [
"https://learn.rtila.com/scenarios/dynamic-content/4"
]
},
"datasets": {
"virtual_items": {
"item_selector": "css=.virtual-item",
"properties": [
{
"name": "text",
"type": "text",
"selector": "css=.virtual-item-text"
},
{
"name": "index",
"type": "text",
"selector": "css=.virtual-item-index"
}
]
}
},
"commands": [
{
"command": "wait_for_selector",
"params": {
"selector": "css=.virtual-scroll-container"
}
},
{
"command": "infinite_scroll",
"params": {
"selector": "css=.virtual-scroll-container",
"max_scrolls": 20,
"scroll_delay": 500,
"do": [
{
"command": "extract_data",
"params": {
"dataset": "virtual_items"
}
}
]
}
}
]
}
Virtualized lists only render items near the current scroll position. The infinite_scroll command repeatedly scrolls the container, allowing the automation to collect every item as it becomes visible.
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!