method
WebView.click
Click at the given viewport coordinates.
Fires native pointerdown/mousedown/pointerup/mouseup/click events with isTrusted: true. The promise resolves after WebContent has processed the full event sequence (including all JS handlers) — no polling, WebKit's own mouse-queue-drain barrier.
Wait for an element to become actionable, then click its center.
Actionability is checked page-side at rAF rate: the element must be attached, have non-zero size, be in the viewport, be stable (bounding box unchanged for 2 consecutive frames), and be the topmost element at its center point (not obscured). Once actionable, a native click fires at the center coordinates.
// Waits for the button to appear and stop animating, then clicks.
await view.click("#submit");Referenced types
interface ClickOptions
interface ClickSelectorOptions
- timeout?: number
Maximum time in milliseconds to wait for the element to become actionable (attached, visible, stable for 2 frames, not obscured).