browser_get_attribute
Retrieve attribute values from web elements using locator strategies like ID, CSS, or XPath for automated browser testing and data extraction.
Instructions
Gets the value of an attribute from an element
Input Schema
Name | Required | Description | Default |
---|---|---|---|
attribute | Yes | Name of the attribute to get | |
by | Yes | Locator strategy to find element | |
timeout | No | Maximum time to wait for element in milliseconds | |
value | Yes | Value for the locator strategy |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"attribute": {
"description": "Name of the attribute to get",
"type": "string"
},
"by": {
"description": "Locator strategy to find element",
"enum": [
"id",
"css",
"xpath",
"name",
"tag",
"class",
"link",
"partialLink"
],
"type": "string"
},
"timeout": {
"description": "Maximum time to wait for element in milliseconds",
"type": "number"
},
"value": {
"description": "Value for the locator strategy",
"type": "string"
}
},
"required": [
"by",
"value",
"attribute"
],
"type": "object"
}