Skip to content

Conversation

@JoelEinbinder
Copy link
Contributor

This adds more examples for using keyboard.type, and keyboard.press. It adds warnings about Shift affecting or not affecting the text generated by certain methods.

fixes #723

docs/api.md Outdated

Focuses the element, and then uses [`keyboard.down`](#keyboarddownkey-options) and [`keyboard.up`](#keyboardupkey).

If `key` is a single character and no modifier keys besides `Shift` are being held down, a `keypress`/`input` event will also generated. The `text` option can be specified to force an input event to be generated.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will also be generated

docs/api.md Outdated
elementHandle.type('World', {delay: 100}); // Types slower, like a user
```

An example of typing into a text field and them submitting the form:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then

@aslushnikov aslushnikov merged commit e11dbd7 into puppeteer:master Oct 27, 2017
ithinkihaveacat pushed a commit to ithinkihaveacat/puppeteer that referenced this pull request Oct 31, 2017
This adds more examples for using `keyboard.type` and `keyboard.press`. It adds warnings about Shift affecting or not affecting the text generated by certain methods.

fixes puppeteer#723
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keyboard API is confusing

2 participants