assert_attribute
AssertionsAsserts that an element has the expected attribute value.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
selector | string | Yes | — | Element selector using type=value format |
attribute | string | Yes | — | Attribute name |
expected_value | string | Yes | — | Expected attribute value |
iframe | string | No | | CSS selector for iframe context |
timeout | number | No | 5000 | Maximum wait time in milliseconds |
Usage Example
RTILA X PROJECT JSON
{
"command": "assert_attribute",
"params": {
"selector": "css=.product-link",
"attribute": "data-in-stock",
"expected_value": "true",
"iframe": "",
"timeout": 5000
}
}
Related Scenarios
- View /scenarios/ecommerce/2 · ecommerce
Related Learning Articles
Was this helpful?
Thank you for your feedback!