Module

x/puppeteer/mod.ts>Keyboard#press

A port of puppeteer running on Deno
Latest
method Keyboard.prototype.press
import { Keyboard } from "https://dotland.deno.dev/x/puppeteer@16.2.0/mod.ts";

Shortcut for {@link Keyboard.down} and {@link Keyboard.up}.

Parameters

key: KeyInput
  • Name of key to press, such as ArrowLeft. See {@link KeyInput} for a list of all key names.
optional
options: { delay?: number; text?: string; }
  • An object of options. Accepts text which, if specified, generates an input event with this text. Accepts delay which, if specified, is the time to wait between keydown and keyup in milliseconds. Defaults to 0.

Returns

Promise<void>