INNER CODE UNIT · Python
browser_click_at
feder-cr/Jobs_Applier_AI_Agent_AIHawk · src/aihawk/mcp/server.py:553
async def browser_click_at(x: float, y: float, hold_seconds: float = 0.0,
browser: Browser = None) -> 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, 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.
Coordinates are relative to the VIEWPORT, not to the page, so the ones in a
snapshot go stale the moment anything scrolls. Nothing raises when that
happens: the click lands on whatever is at that spot now. Take a fresh
snapshot after anything that could have moved the page, and prefer
browser_click with the element's `selector` whenever it has one."""
# hold_seconds needs invisible-playwright 0.9.0 or newer to mean anything:
# in every earlier version the wait it is built on returned instantly, so
# the press and the release happened in the same frame and the hold never
# happened, on the one tool that exists for sliders and press-and-hold
# challenges. The floor in pyproject.toml is set accordingly. Said here and