browser_get_element_attribute
Retrieve the value of a specific attribute from a web element using its CSS, XPath, ID, name, class, or tag selector.
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": {
"session_id": "<session_id>",
"selector": "<selector>",
"attribute": "<attribute>"
},
"name": "browser_get_element_attribute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | The session ID | |
| selector | Yes | Element selector | |
| attribute | Yes | Attribute name to get | |
| by | No | Selector type (css, xpath, id, name, class, tag) | css |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |