Skip to main content

pagination Scenario 4 — Load More Button (5 clicks)

Written by RTILA X Engineering Team

Intermediate ~6 min
Prerequisites: pagination/1 pagination/2

What You'll Learn

Click a load-more button in a loop

Real-World Use Case

Handling sites without classic pagination

LIVE DEMO

Load More Button

Each click reveals six more listings until all 30 are loaded.

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.

EXPECTED OUTPUT

Load More 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 PROJECT JSON

RTILA X Automation Project

load-more-items.json
{
  "name": "Load_More_Items",
  "settings": {
    "urls": [
      "https://learn.rtila.com/scenarios/pagination/4"
    ]
  },
  "datasets": {
    "load_more_items": {
      "item_selector": "css=.listing-item",
      "properties": [
        {
          "name": "title",
          "type": "text",
          "selector": "css=.listing-title"
        },
        {
          "name": "description",
          "type": "text",
          "selector": "css=.listing-desc"
        }
      ]
    }
  },
  "commands": [
    {
      "command": "extract_data",
      "params": {
        "dataset": "load_more_items"
      }
    },
    {
      "command": "repeat",
      "params": {
        "times": 4,
        "do": [
          {
            "command": "click",
            "params": {
              "selector": "css=.load-more-btn"
            }
          },
          {
            "command": "wait",
            "params": {
              "timeout": 2000
            }
          },
          {
            "command": "extract_data",
            "params": {
              "dataset": "load_more_items"
            }
          }
        ]
      }
    }
  ]
}

The repeat command runs exactly five cycles. Each cycle clicks the Load More button, waits for new items to render, and extracts the updated list. This works well when the number of button clicks is known 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 3 RTILA X commands and is referenced in 2 learning articles.

Continue Learning

Was this helpful?