DocsElement Statebrowser_get_element_at_position

browser_get_element_at_position

Browser Get Element At Position

Get detailed information about the DOM element at specific XY coordinates. Returns element tag, ID, classes, bounding box, text content, and computed styles. Use with browser_show_grid_overlay to find coordinates. Useful for debugging and building element picker UIs.

Usage Example

12345678910111213
import asyncio
from owl_browser import OwlBrowser, RemoteConfig
# Async usage
async with OwlBrowser(config) as browser:
context = await browser.create_context()
context_id = context["context_id"]
await browser.get_element_at_position(
context_id=context_id,
x=0,
y=0
)

Parameters

Required

context_idstringrequired

The unique identifier of the browser context (e.g., 'ctx_000001')

xnumberrequired

X coordinate in pixels from the left edge of the viewport. Use browser_show_grid_overlay to visualize coordinates on the page

ynumberrequired

Y coordinate in pixels from the top edge of the viewport. Use browser_show_grid_overlay to visualize coordinates on the page

Response

Returns a JSON object with the operation result.

{
  "success": true,
  "result": <value>
}