mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
Inroduce page.press (#96)
This patch: - introduces page.press() method - adds more input tests References #89
This commit is contained in:
committed by
Andrey Lushnikov
parent
71f8c76f04
commit
febd747c5b
@@ -44,6 +44,7 @@
|
||||
* [page.navigate(url, options)](#pagenavigateurl-options)
|
||||
* [page.pdf(options)](#pagepdfoptions)
|
||||
* [page.plainText()](#pageplaintext)
|
||||
* [page.press(key[, options])](#pagepresskey-options)
|
||||
* [page.reload(options)](#pagereloadoptions)
|
||||
* [page.screenshot([options])](#pagescreenshotoptions)
|
||||
* [page.setContent(html)](#pagesetcontenthtml)
|
||||
@@ -437,6 +438,14 @@ The `format` options are:
|
||||
#### page.plainText()
|
||||
- returns: <[Promise]<[string]>> Returns page's inner text.
|
||||
|
||||
#### page.press(key[, options])
|
||||
- `key` <[string]> Name of key to press, such as `ArrowLeft`. See [KeyboardEvent.key](https://www.w3.org/TR/uievents-key/)
|
||||
- `options` <[Object]>
|
||||
- `text` <[string]> If specified, generates an input event with this text.
|
||||
- returns: <[Promise]>
|
||||
|
||||
Shortcut for [`keyboard.down`](#keyboarddownkey) and [`keyboard.up`](#keyboardupkey).
|
||||
|
||||
#### page.reload(options)
|
||||
- `options` <[Object]> Navigation parameters, same as in [page.navigate](#pagenavigateurl-options).
|
||||
- returns: <[Promise]<[Response]>> Promise which resolves to the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect.
|
||||
|
||||
Reference in New Issue
Block a user