browser_get_attribute
Get the value of a named attribute from a web element using its CSS selector. Enables data extraction and interaction checks in browser 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": "browser_get_attribute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | Selector or ref for the element | |
| attribute | Yes | Name of the attribute to get | |
| sessionId | No | Browser session ID |