import { Media, Viewport, SendKeysPayload, A11ySnapshotPayload, WriteFilePayload, ReadFilePayload, RemoveFilePayload, SnapshotPluginConfig, SaveSnapshotPayload, SelectOptionPayload, SendMousePayload, } from '../dist/index'; /** * Executes a command on the server. If this is a custom command, you need to implement a plugin * to execute this command. */ export function executeServerCommand(command: string, payload?: P): Promise; /** * Sets the viewport of the browser. */ export function setViewport(viewport: Viewport): Promise; /** * Emulates browser media, such as screen/print or color scheme, to be used in * CSS media queries. * * The `forcedColors` property is Playwright-only API that does not work in WebKit. * * @example * ```ts * await emulateMedia({ * colorScheme: 'dark', * reducedMotion: 'reduce', * }); * ``` * * @example * ```ts * await emulateMedia({ * media: 'print', * }); * ``` * * @example * ```ts * await emulateMedia({ * forcedColors: 'active', * }); * ``` */ export function emulateMedia(media: Media): Promise; /** * Sets the user agent of the browser. This is a puppeteer-only API. */ export function setUserAgent(userAgent: string): Promise; /** * Sends a string of keys for the browser to press (all at once, as with single keys * or shortcuts; e.g. `{press: 'Tab'}` or `{press: 'Shift+a'}` or * `{press: 'Option+ArrowUp}`) or type (in sequence, e.g. `{type: 'Your name'}`) natively. * * For specific documentation of the strings to leverage here, see the Playwright documentation, * here: * * - `press`: https://playwright.dev/docs/api/class-keyboard#keyboardpresskey-options * - `type`: https://playwright.dev/docs/api/class-keyboard#keyboardtypetext-options * * Or, the Puppeter documentation, here: * * - `press`: https://pptr.dev/#?product=Puppeteer&show=api-keyboardpresskey-options * - `type`: https://pptr.dev/#?product=Puppeteer&show=api-keyboardtypetext-options * * Or, the Webdriver documentation, here: * * https://webdriver.io/docs/api/browser/keys/ * * @param payload An object including a `press` or `type` property an the associated string * for the browser runner to apply via that input method. * * @example * ```ts * await sendKeys({ * press: 'Tab', * }); * ``` * * @example * ```ts * await sendKeys({ * type: 'Your address', * }); * ``` * **/ export function sendKeys(payload: SendKeysPayload): Promise; /** * Sends an action for the mouse to move it to a specific position or click a mouse button (left, middle, or right). * * WARNING: When moving the mouse or holding down a mouse button, the mouse stays in this state as long as * you do not explicitly move it to another position or release the button. For this reason, it is recommended * to reset the mouse state with the `resetMouse` command after each test case manipulating the mouse to avoid * unexpected side effects. * * @param payload An object representing a mouse action specified by the `type` property (move, click, down, up) * and including some properties to configure this action. * * @example * ```ts * await sendMouse({ * type: 'move', * position: [100, 100] * }); * ``` * * @example * ```ts * await sendMouse({ * type: 'click', * position: [100, 100], * button: 'right' * }); * ``` * * @example * ```ts * await sendMouse({ * type: 'down' * }); * ``` * **/ export function sendMouse(payload: SendMousePayload): Promise; /** * Selects an option in a