DocsScreenshots & Visualbrowser_show_grid_overlay

browser_show_grid_overlay

Browser Show Grid Overlay

Display an XY coordinate grid overlay on the page with position labels at intersections. Essential for finding exact pixel coordinates when using browser_click with coordinates or browser_drag_drop. The grid helps identify precise positions for mouse operations.

Usage Example

1234567891011
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.show_grid_overlay(
context_id=context_id
)

Parameters

Required

context_idstringrequired

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

Optional

horizontal_linesnumber

Number of horizontal lines to display from top to bottom. Default: 25. More lines = more precise coordinate reading but more visual clutter

vertical_linesnumber

Number of vertical lines to display from left to right. Default: 25

line_colorstring

CSS color for grid lines (use low alpha for visibility). Default: 'rgba(255, 0, 0, 0.15)'

text_colorstring

CSS color for coordinate labels at intersections. Default: 'rgba(255, 0, 0, 0.4)'

Response

Returns a JSON object with the operation result.

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