browser_get_attribute
Extract attribute values from web elements using CSS selectors, such as href, src, or class attributes, for automated browser testing and data retrieval.
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 | CSS selector for the element | |
| attribute | Yes | Name of the attribute to get (e.g., 'href', 'src', 'class') | |
| timeout | No | Timeout in milliseconds |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |