variables Scenario 2 — Parameterized Product URL from Dataset
Written by RTILA X Engineering Team
Beginner ~4 min
What You'll Learn
Perform basic arithmetic with variables
Real-World Use Case
Calculating tax or discounts
LIVE DEMO
Product 101 — Wireless Headphones
| Driver Size | 40mm |
|---|---|
| Impedance | 32 Ohms |
| Battery Life | 30 hours |
| Connectivity | Bluetooth 5.3 |
| Weight | 250g |
The Wireless Headphones offer premium active noise cancellation, a lightweight build, and immersive sound quality for all-day listening.
EXPECTED OUTPUT
RTILA X PROJECT JSON
{
"name": "Parameterized_Product_URL",
"settings": {
"urls": [
"https://learn.rtila.com/scenarios/variables/2"
],
"variables": [
{
"name": "product_id",
"is_list": false,
"value": "101"
}
]
},
"datasets": {
"product_specs": {
"item_selector": "css=table.detail-specs tr",
"properties": [
{
"name": "field",
"type": "text",
"selector": "css=th"
},
{
"name": "value",
"type": "text",
"selector": "css=td"
}
]
}
},
"commands": [
{
"command": "goto",
"params": {
"url": "https://learn.rtila.com/scenarios/variables/product/${product_id}"
}
},
{
"command": "wait_for_selector",
"params": {
"selector": "css=.product-detail-page"
}
},
{
"command": "extract_data",
"params": {
"dataset": "product_specs"
}
}
]
}
A single global variable can be substituted into a URL using the ${variable} syntax. Here, the product ID is injected into the detail-page URL.
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?
Thank you for your feedback!