2020-06-04 14:56:45 +00:00
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home ](./index.md ) > [puppeteer ](./puppeteer.md ) > [Keyboard ](./puppeteer.keyboard.md ) > [type ](./puppeteer.keyboard.type.md )
## Keyboard.type() method
2020-06-25 09:56:55 +00:00
Sends a `keydown` <!-- --> , `keypress` <!-- --> /`input`<!-- --> , and `keyup` event for each character in the text.
2020-06-04 14:56:45 +00:00
< b > Signature:< / b >
```typescript
2020-06-23 11:55:42 +00:00
type(text: string, options?: {
2020-06-04 14:56:45 +00:00
delay?: number;
}): Promise< void > ;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
2020-06-25 09:56:55 +00:00
| text | string | A text to type into a focused element. |
| options | { delay?: number; } | An object of options. Accepts delay which, if specified, is the time to wait between < code > keydown< / code > and < code > keyup< / code > in milliseconds. Defaults to 0. |
2020-06-04 14:56:45 +00:00
< b > Returns:< / b >
Promise< void>
2020-06-25 09:56:55 +00:00
## Remarks
To press a special key, like `Control` or `ArrowDown` <!-- --> , use [Keyboard.press() ](./puppeteer.keyboard.press.md )<!-- --> .
Modifier keys DO NOT effect `keyboard.type` <!-- --> . Holding down `Shift` will not type the text in upper case.
## Example
```js
await page.keyboard.type('Hello'); // Types instantly
await page.keyboard.type('World', {delay: 100}); // Types slower, like a user
```