/** * Trusted input helpers built on the CDP Input domain. Unlike synthetic * dispatchEvent, Input.* produces trusted events that pass on sites which reject * scripted interaction. Elements are addressed by a resolved {@link ResolvedElement}. * * Adapted from the `chrome-use` skill (skills/chrome-use/scripts/lib/input.ts). */ import type { CdpClient, ResolvedElement } from './types.js'; /** Click an element with a trusted left mouse press/release at its center. */ export declare function clickElement(cdp: CdpClient, sessionId: string, el: ResolvedElement): Promise; /** Move the mouse to the element center (hover). */ export declare function hoverElement(cdp: CdpClient, sessionId: string, el: ResolvedElement): Promise; /** Focus an element via DOM.focus. */ export declare function focusElement(cdp: CdpClient, sessionId: string, el: ResolvedElement): Promise; /** * Clear an element and insert `text`. Clears any existing value first (for * inputs/textareas/contenteditable) then inserts as trusted text and fires an * input event so frameworks (React, Vue, …) observe the change. */ export declare function fillElement(cdp: CdpClient, sessionId: string, el: ResolvedElement, text: string): Promise; /** Focus an element and insert `text` as trusted input (fast path, no per-key events). */ export declare function typeText(cdp: CdpClient, sessionId: string, el: ResolvedElement, text: string): Promise; /** * Press a key chord like `Enter`, `Control+a`, `Meta+Enter`, or `Shift+Tab`. * Modifiers are held (keyDown) before the main key and released (keyUp) after. */ export declare function pressKey(cdp: CdpClient, sessionId: string, key: string): Promise; /** Scroll the page by `px` pixels in the given direction via a wheel event. */ export declare function scrollBy(cdp: CdpClient, sessionId: string, dir: 'up' | 'down' | 'left' | 'right', px: number): Promise; //# sourceMappingURL=input.d.ts.map