Skip to main content

file-download Scenario 1 — Download CSV File

Written by RTILA X Engineering Team

Beginner ~4 min

What You'll Learn

Download a CSV file after clicking a button

Real-World Use Case

Automating periodic report downloads

LIVE DEMO

Reports Section

NameDate
Report A2026-01-01
Report B2026-01-02
Report C2026-01-03
Report D2026-01-04
Report E2026-01-05
EXPECTED OUTPUT

RTILA X PROJECT JSON

    {
  "name": "Download_CSV_File",
  "settings": {
    "urls": [
      "https://learn.rtila.com/scenarios/file-download/1"
    ]
  },
  "datasets": {
    "download_status": {
      "item_selector": "css=#download-status",
      "properties": [
        {
          "name": "message",
          "type": "text",
          "selector": "css=self"
        }
      ]
    }
  },
  "commands": [
    {
      "command": "wait_for_selector",
      "params": {
        "selector": "css=#download-csv-btn"
      }
    },
    {
      "command": "click",
      "params": {
        "selector": "css=#download-csv-btn"
      }
    },
    {
      "command": "wait_for_download",
      "params": {
        "selector": "css=#download-csv-btn",
        "save_path": "./output/report.csv"
      }
    },
    {
      "command": "wait_for_selector",
      "params": {
        "selector": "css=#download-status"
      }
    },
    {
      "command": "extract_data",
      "params": {
        "dataset": "download_status"
      }
    }
  ]
}
  

RTILA X Concepts

The wait_for_download command captures the file after clicking the download button. Once the download completes, the status message is extracted.

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?