Skip to main content

basic-navigation Scenario 4 — Extract Page Title and Meta Description

Written by RTILA X Engineering Team

Beginner ~4 min

What You'll Learn

Execute JavaScript to read page metadata

Real-World Use Case

Collecting SEO meta tags for competitor analysis

LIVE DEMO

Page Metadata Demo

Visible content mirrored by the actual page title and meta description.

Demo Page Title — Product Catalog 2025

Browse our complete catalog of 48 products across 6 categories with detailed specifications and pricing.
EXPECTED OUTPUT

Extracted Metadata

{
  "title": "Basic Navigation Scenario 4 — RTILA X",
  "meta_description": "Extract page title and meta description from a demo page for RTILA X automation testing."
}
RTILA X PROJECT JSON

RTILA X Automation Project

extract-page-metadata.json
{
  "name": "Extract_Page_Title_And_Meta_Description",
  "settings": {
    "urls": [
      "https://learn.rtila.com/scenarios/basic-navigation/4"
    ]
  },
  "datasets": {
    "title_and_meta_desc": {
      "item_selector": "css=html",
      "properties": [
        {
          "name": "title",
          "type": "text",
          "selector": "css=title"
        },
        {
          "name": "description",
          "type": "attribute",
          "selector": "css=meta[name=\"description\"]",
          "attribute": "content"
        }
      ]
    }
  }
}

RTILA X Concepts

The execute_script command runs JavaScript in the browser and stores the result in an output variable. This is useful for extracting metadata that is not directly exposed as a standard attribute.

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 2 learning articles.

Continue Learning

Was this helpful?