Skip to main content

multi-tab Scenario 3 — Trigger Popup Window and Extract

Written by RTILA X Engineering Team

Advanced ~10 min
Prerequisites: multi-tab/1 multi-tab/2

What You'll Learn

Manage complex tab workflows with fallback URLs

Real-World Use Case

Handling pop-ups and redirects seamlessly

LIVE DEMO

Popup Window Extraction

A button-triggered popup containing an account table.

EXPECTED OUTPUT

Popup Data

field value
Account ID ACC-1001
Plan Pro Annual
Status Active
RTILA X PROJECT JSON

RTILA X Automation Project

extract-popup-window-data.json
{
  "name": "Extract_Popup_Window_Data",
  "settings": {
    "urls": [
      "https://learn.rtila.com/scenarios/multi-tab/3"
    ]
  },
  "datasets": {
    "popup_data": {
      "item_selector": "css=table.popup-data tbody tr",
      "properties": [
        {
          "name": "field",
          "type": "text",
          "selector": "css=td:nth-child(1)"
        },
        {
          "name": "value",
          "type": "text",
          "selector": "css=td:nth-child(2)"
        }
      ]
    }
  },
  "commands": [
    {
      "command": "click",
      "params": {
        "selector": "css=.open-popup"
      }
    },
    {
      "command": "wait_for_selector",
      "params": {
        "selector": "css=#popup-window"
      }
    },
    {
      "command": "extract_data",
      "params": {
        "dataset": "popup_data"
      }
    },
    {
      "command": "click",
      "params": {
        "selector": "css=.close-popup"
      }
    }
  ]
}

Popup windows are detected and handled just like other elements. This scenario clicks the trigger, waits for the popup to appear, extracts its table, and closes the popup.

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?