tb_getAttribute
Reads a specified attribute (href, value, aria-label, class, data-*) from an element in an active browser session using CSS, XPath, ID, or other locators.
Instructions
Read an attribute of an element (e.g. 'href', 'value', 'aria-label', 'class', 'data-*').
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": {
"sessionId": "<sessionId>",
"value": "<value>",
"attribute": "<attribute>"
},
"name": "tb_getAttribute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | No | Locator strategy | css |
| value | Yes | Locator value | |
| attribute | Yes | Attribute name | |
| sessionId | Yes | Session ID from tb_openBrowser | |
| timeoutMs | No | Implicit wait |