write()
Types the given text into the focused or given element.
Examples
Section titled “Examples”await write('admin')await write('admin', into(textBox("Username"),{force:true})Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
text | string | Text to type into the element. |
into | selector | Element | string | A selector of an element to write into. |
options | Object | Default: {delay:0}. |
options.delay | number | Time to wait between key presses in milliseconds. Default: 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: true. |
options.waitForStart | number | wait for navigation to start. Accepts time in milliseconds. Default: 100. |
options.navigationTimeout | number | Navigation timeout value in milliseconds for navigation after click. Default: 30000. |
options.hideText | boolean | Prevent given text from being written to log output. Default: false. |
options.force | boolean | Set to true to perform action on hidden/disabled elements. Default: false. |
options.waitForEvents | Array | Events available to wait for [‘DOMContentLoaded’, ‘loadEventFired’, ‘networkAlmostIdle’, ‘networkIdle’, ‘firstPaint’, ‘firstContentfulPaint’, ‘firstMeaningfulPaint’, ‘targetNavigated’] Default: []. |
Returns
Section titled “Returns”| Type | Description |
|---|---|
Promise<void> |