mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-15 06:02:57 +03:00
docs(api): replace select-all note with example (#3328)
This commit is contained in:
parent
411c738026
commit
4ec3290da3
10
docs/api.md
10
docs/api.md
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user