Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/pptr/src/JSHandle.ts>ElementHandle#press

Headless Chrome Deno API
Latest
method ElementHandle.prototype.press
import { ElementHandle } from "https://deno.land/x/pptr@1.2.0/src/JSHandle.ts";

Focuses the element, and then uses Keyboard.down and Keyboard.up.

Parameters

key: KeyInput
  • Name of key to press, such as ArrowLeft. See KeyInput for a list of all key names.
optional
options: PressOptions

Returns

Promise<void>