browser_get_attribute
Retrieves the value of a specified attribute from a web element located by ID, CSS, XPath, name, tag, class, or link, enabling validation of element properties.
Instructions
Gets the value of an attribute 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": {
"by": "<by>",
"value": "<value>",
"attribute": "<attribute>"
},
"name": "browser_get_attribute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | Yes | Locator strategy to find element | |
| value | Yes | Value for the locator strategy | |
| timeout | No | Maximum time to wait for element in milliseconds | |
| attribute | Yes | Name of the attribute to get |