Documentation Index
Fetch the complete documentation index at: https://mintlify.com/vercel-labs/agent-browser/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Inspection commands allow you to extract information from elements and check their state.
get text
Get text content of an element.
| Parameter | Description |
|---|
selector | Element selector |
Examples:
agent-browser get text @e1
agent-browser get text "#username"
agent-browser get text ".error-message"
Output:
Welcome to Example Domain
get html
Get innerHTML of an element.
| Parameter | Description |
|---|
selector | Element selector |
Examples:
agent-browser get html @e2
agent-browser get html "#content"
Output:
<p>This is <strong>example</strong> content.</p>
get value
Get value of an input element.
| Parameter | Description |
|---|
selector | Input element selector |
Examples:
agent-browser get value @e3
agent-browser get value "#email"
Output:
get attr
Get attribute value of an element.
| Parameter | Description |
|---|
selector | Element selector |
attribute | Attribute name |
Examples:
agent-browser get attr @e4 href
agent-browser get attr "#logo" src
agent-browser get attr "button" data-id
Output:
get title
Get page title.
Examples:
Output:
get url
Get current page URL.
Examples:
Output:
get count
Count matching elements.
| Parameter | Description |
|---|
selector | Element selector |
Examples:
agent-browser get count ".item"
agent-browser get count "button"
Output:
get box
Get bounding box of an element.
| Parameter | Description |
|---|
selector | Element selector |
Examples:
agent-browser get box @e1
agent-browser get box "#header"
Output:
{"x": 10, "y": 20, "width": 300, "height": 50}
get styles
Get computed styles of an element.
| Parameter | Description |
|---|
selector | Element selector |
Examples:
agent-browser get styles @e2
agent-browser get styles ".button"
Output:
{"display": "block", "color": "rgb(0, 0, 0)", ...}
Check Element State
is visible
Check if element is visible.
| Parameter | Description |
|---|
selector | Element selector |
Examples:
agent-browser is visible @e1
agent-browser is visible "#modal"
Output:
is enabled
Check if element is enabled.
| Parameter | Description |
|---|
selector | Element selector |
Examples:
agent-browser is enabled @e2
agent-browser is enabled "#submit-button"
Output:
is checked
Check if checkbox or radio is checked.
| Parameter | Description |
|---|
selector | Checkbox/radio selector |
Examples:
agent-browser is checked @e3
agent-browser is checked "#agree-terms"
Output:
Workflow Examples
# Submit form
agent-browser click @e5
# Wait for success message
agent-browser wait @e6
# Verify message text
agent-browser get text @e6
# Output: "Form submitted successfully"
# Verify URL changed
agent-browser get url
# Output: https://example.com/success
# Get page title
agent-browser get title
# Count all links
agent-browser get count "a"
# Extract all product names
agent-browser get text ".product-name"
# Get current URL
agent-browser get url
Conditional Logic
# Check if error is visible
agent-browser is visible ".error"
# If visible, get error message
agent-browser get text ".error"
# Check if button is enabled
agent-browser is enabled "#submit"
# Check if checkbox is checked
agent-browser is checked "#newsletter"
JSON Output for Agents
# Get text in JSON format
agent-browser get text @e1 --json
# {"success":true,"data":"Welcome to Example Domain"}
# Check visibility in JSON format
agent-browser is visible @e2 --json
# {"success":true,"data":true}
# Get count in JSON format
agent-browser get count ".item" --json
# {"success":true,"data":5}