Taiko
Documentation

Home / API Reference

write

Types the given text into the focused or given element.

Examples

await write('admin')
await write('admin', into(textBox("Username"))

Parameters


text

Text to type into the element.


into

A selector of an element to write into.


options

options.delay number

Time to wait between key presses in milliseconds.

Default value
0

options.waitForNavigation boolean

Wait for navigation after the click. Default navigation timeout is 15 seconds, to override pass { navigationTimeout: 10000 } in options parameter.

Default value
true

options.waitForStart number

wait for navigation to start. Accepts time in milliseconds.

Default value
100

options.navigationTimeout number

Navigation timeout value in milliseconds for navigation after click.

Default value
30000

options.hideText boolean

Prevent given text from being written to log output.

Default value
false

options.waitForEvents

Events available to wait for ['DOMContentLoaded', 'loadEventFired', 'networkAlmostIdle', 'networkIdle', 'firstPaint', 'firstContentfulPaint', 'firstMeaningfulPaint']

Default value
['firstMeaningfulPaint']

Returns

Promise