Sends some text to an element. Can be used to set the value of a form element or to send a sequence of key strokes to an element. Any UTF-8 character may be specified.

update also clears the existing value of the element by calling the clear() beforehand.

An object map with available keys and their respective UTF-8 characters, as defined on W3C WebDriver draft spec, is loaded onto the main Nightwatch instance as browser.Keys.

For more info on working with DOM elements in Nightwatch, refer to the Finding & interacting with DOM Elements guide page.


                    browser.element(selector).update(characters, ...keys)


export default {
  demoTest(browser: NightwatchAPI): void {
    browser.element('input[type=text]').update('nightwatch', browser.Keys.ENTER);

  async demoTestAsync(browser: NightwatchAPI): Promise<void> {
    await browser.element('input[type=text]').update('nightwatch', browser.Keys.ENTER);


Name Type description
keys string


Type description

W3C WebDriver spec