INNER CODE UNIT · Python

browser_click

feder-cr/Jobs_Applier_AI_Agent_AIHawk · src/aihawk/mcp/server.py:380

async def browser_click(selector: str) -> str:
    """Click the first element matching a CSS selector.

    Scrolls it into view and waits for it to be clickable. When no selector can
    describe the target, use browser_click_at with coordinates from
    browser_snapshot."""
    return await actions.click(await registry.ensure(), selector)


@mcp.tool()
async def browser_click_at(x: float, y: float, hold_seconds: float = 0.0) -> Image:
    """Click (or press-and-hold) a raw viewport coordinate instead of a
    selector - for targets a selector cannot reliably reach: a slider track, a
    canvas-drawn captcha, or a precise point inside a wider element. Moves the
    pointer there first (no teleport), then down, then up, holding first if
    hold_seconds is set. Returns a screenshot taken right after release.

    hold_seconds needs invisible-playwright 0.9.0 or newer to mean anything. In

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…