Skip to main content

file-download Scenario 4 — Select Export Format and Download

Written by RTILA X Engineering Team

Advanced ~10 min
Prerequisites: file-download/1

What You'll Learn

Save a web page as PDF

Real-World Use Case

Generating printable reports

LIVE DEMO

MetricValue
Visitors12,480
Conversions846
Revenue$84,210
Avg. Session4m 12s
Bounce Rate42.5%
EXPECTED OUTPUT

RTILA X PROJECT JSON

    {
  "name": "Select_Export_And_Download",
  "settings": {
    "urls": [
      "https://learn.rtila.com/scenarios/file-download/4"
    ]
  },
  "datasets": {
    "export_status": {
      "item_selector": "css=#export-status",
      "properties": [
        {
          "name": "message",
          "type": "text",
          "selector": "css=self"
        }
      ]
    }
  },
  "commands": [
    {
      "command": "wait_for_selector",
      "params": {
        "selector": "css=#export-format"
      }
    },
    {
      "command": "select_option",
      "params": {
        "selector": "css=#export-format",
        "value": "JSON"
      }
    },
    {
      "command": "wait_for_selector",
      "params": {
        "selector": "css=#export-btn"
      }
    },
    {
      "command": "click",
      "params": {
        "selector": "css=#export-btn"
      }
    },
    {
      "command": "wait_for_selector",
      "params": {
        "selector": "css=#export-status"
      }
    },
    {
      "command": "extract_data",
      "params": {
        "dataset": "export_status"
      }
    }
  ]
}
  

RTILA X Concepts

The select_option command sets the export format before triggering the download. After clicking Export, 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 1 RTILA X command and is referenced in 1 learning article.

Continue Learning

Was this helpful?