get_attribute
Retrieve attribute values from web elements using CSS, XPath, or other locator strategies. Specify the element and attribute name to get its value for assertions or debugging.
Instructions
Get an attribute value from an element.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | No | Locator strategy | css |
| timeout | No | Wait timeout in seconds | |
| selector | Yes | CSS selector, XPath, or other locator value | |
| attribute | Yes | Attribute name e.g. href, value, class |