Skip to main content

search-filter Scenario 2 — Select Category from Dropdown and Extract

Written by RTILA X Engineering Team

Beginner ~4 min

What You'll Learn

Select options from a dropdown

Real-World Use Case

Filtering by category or location

LIVE DEMO

Category Filter

Choose a category and extract the filtered product list.

48 products found

Wireless Noise-Cancelling Headphones $249.99Electronics
4K Ultra HD Monitor $499.99Electronics
Mechanical Gaming Keyboard $129.99Electronics
USB-C Docking Station $159.99Electronics
Portable SSD 1TB $99.99Electronics
Smart Home Hub $79.99Electronics
Wireless Charging Pad $29.99Electronics
Bluetooth Speaker $59.99Electronics
Classic Cotton T-Shirt $19.99Clothing
Slim Fit Jeans $69.99Clothing
Waterproof Rain Jacket $119.99Clothing
Running Sneakers $129.99Clothing
Wool Blend Sweater $89.99Clothing
Leather Belt $39.99Clothing
Sun Hat $24.99Clothing
Sport Socks Pack $9.99Clothing
JavaScript: The Good Parts $16.95Books
Design Patterns Explained $28.99Books
Data Structures in Python $49.99Books
Machine Learning Basics $39.99Books
Web Scraping Handbook $34.99Books
API Design Guide $42.50Books
DevOps Best Practices $36.00Books
Clean Architecture $31.99Books
Stainless Steel Cookware Set $199.99Home & Garden
Robot Vacuum Cleaner $299.99Home & Garden
Indoor Plant Pot Set $34.99Home & Garden
LED Desk Lamp $44.99Home & Garden
Bamboo Cutting Board $27.99Home & Garden
Garden Tool Set $54.99Home & Garden
Scented Candle Collection $39.99Home & Garden
Throw Blanket $49.99Home & Garden
Yoga Mat Premium $39.99Sports
Adjustable Dumbbells $329.99Sports
Running Water Bottle $19.99Sports
Resistance Bands Set $24.99Sports
Tennis Racket Pro $149.99Sports
Cycling Helmet $59.99Sports
Jump Rope Speed $12.99Sports
Foam Roller Recovery $27.99Sports
Building Blocks Set $49.99Toys
Remote Control Car $79.99Toys
Board Game Strategy $34.99Toys
Puzzle 1000 Pieces $19.99Toys
Action Figure Collection $89.99Toys
Art Supplies Kit $29.99Toys
Science Experiment Kit $54.99Toys
Plush Bear Large $22.99Toys
EXPECTED OUTPUT

Electronics Products

name
Wireless Noise-Cancelling Headphones
4K Ultra HD Monitor
Mechanical Gaming Keyboard
USB-C Docking Station
Portable SSD 1TB
Smart Home Hub
Wireless Charging Pad
Bluetooth Speaker
RTILA X PROJECT JSON

RTILA X Automation Project

select-category-extract.json
    {
  "name": "Select_Category_And_Extract",
  "settings": {
    "urls": [
      "https://learn.rtila.com/scenarios/search-filter/2"
    ],
    "headless": false,
    "navigation_timeout": 30000,
    "max_concurrent_workers": 1,
    "humanoidEnabled": true,
    "humanoidSensitivity": "medium"
  },
  "datasets": {
    "filtered_products": {
      "item_selector": "css=.filter-result",
      "properties": [
        {
          "name": "name",
          "type": "text",
          "selector": "css=.result-name"
        }
      ]
    }
  },
  "commands": [
    {
      "command": "goto",
      "params": {
        "url": "https://learn.rtila.com/scenarios/search-filter/2"
      }
    },
    {
      "command": "wait_for_selector",
      "params": {
        "selector": "css=#category-select"
      }
    },
    {
      "command": "select_option",
      "params": {
        "selector": "css=#category-select",
        "value": "Electronics"
      }
    },
    {
      "command": "click",
      "params": {
        "selector": "css=#apply-filter"
      }
    },
    {
      "command": "wait_for_selector",
      "params": {
        "selector": "css=.filtered-results .filter-result"
      }
    },
    {
      "command": "extract_data",
      "params": {
        "dataset": "filtered_products"
      }
    }
  ]
}
  

RTILA X Concepts

select_option changes a select control, click triggers the filter action, and wait_for_selector ensures the new results are rendered before extraction.

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?