get_attribute
Retrieve an attribute value from a web element using a CSS, XPath, ID, or other selector to verify links, form values, or classes during Selenium automation.
Instructions
Get an attribute value from an element.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"selector": "<selector>",
"attribute": "<attribute>"
},
"name": "get_attribute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | No | Strategy | css |
| timeout | No | Seconds | |
| selector | Yes | Locator value | |
| attribute | Yes | Attribute name e.g. href, value, class |