mirror of
https://github.com/LeCoupa/awesome-cheatsheets.git
synced 2025-11-08 22:11:35 +00:00
feat(puppeteer): add keyboard functions
This commit is contained in:
@@ -231,11 +231,12 @@ accessibility.snapshot([options]) // Captures the current state of the accessibi
|
|||||||
// Keyboard provides an api for managing a virtual keyboard.
|
// Keyboard provides an api for managing a virtual keyboard.
|
||||||
// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-keyboard
|
// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-keyboard
|
||||||
|
|
||||||
keyboard.down(key[, options]) //
|
keyboard.down(key[, options]) // Dispatches a keydown event.
|
||||||
keyboard.press(key[, options]) //
|
keyboard.press(key[, options]) // Shortcut for keyboard.down and keyboard.up.
|
||||||
keyboard.sendCharacter(char) //
|
keyboard.sendCharacter(char) // Dispatches a keypress and input event. This does not send a keydown or keyup event.
|
||||||
keyboard.type(text[, options]) //
|
keyboard.type(text[, options]) // Sends a keydown, keypress/input, and keyup event for each character in the text.
|
||||||
keyboard.up(key) //
|
keyboard.up(key) // Dispatches a keyup event.
|
||||||
|
|
||||||
|
|
||||||
// MOUSE
|
// MOUSE
|
||||||
// The Mouse class operates in main-frame CSS pixels relative to the top-left corner of the viewport.
|
// The Mouse class operates in main-frame CSS pixels relative to the top-left corner of the viewport.
|
||||||
@@ -276,7 +277,7 @@ dialog.dismiss() //
|
|||||||
dialog.message() //
|
dialog.message() //
|
||||||
dialog.type() //
|
dialog.type() //
|
||||||
|
|
||||||
// CONSOLE MESSAGE
|
// CONSOLE MESSAGEç
|
||||||
// ConsoleMessage objects are dispatched by page via the 'console' event.
|
// ConsoleMessage objects are dispatched by page via the 'console' event.
|
||||||
// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-consolemessage
|
// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-consolemessage
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user