Skip to main content

assert_attribute

Assertions

Asserts 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
assert_attribute.json
{
  "command": "assert_attribute",
  "params": {
    "selector": "css=.product-link",
    "attribute": "data-in-stock",
    "expected_value": "true",
    "iframe": "",
    "timeout": 5000
  }
}

Related Scenarios

Related Learning Articles

Was this helpful?