Skip to content

Commit

Permalink
docs(api): replace select-all note with example (#3328)
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunattam authored Aug 7, 2020
1 parent 411c738 commit 4ec3290
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3309,14 +3309,20 @@ await page.keyboard.press('Backspace');
// Result text will end up saying 'Hello!'
```

An example of pressing `A`
An example of pressing uppercase `A`
```js
await page.keyboard.press('Shift+KeyA');
// or
await page.keyboard.press('Shift+A');
```

> **NOTE** On MacOS, keyboard shortcuts like `⌘ A` -> Select All do not work. See [#1313](https://github.com/GoogleChrome/puppeteer/issues/1313)
An example to trigger select-all with the keyboard
```js
// on Windows and Linux
await page.keyboard.press('Control+A');
// on macOS
await page.keyboard.press('Meta+A');
```

<!-- GEN:toc -->
- [keyboard.down(key)](#keyboarddownkey)
Expand Down

0 comments on commit 4ec3290

Please sign in to comment.