diff --git a/lib/api/element-commands/updateValue.js b/lib/api/element-commands/updateValue.js index b6edef932..7c2c907d7 100644 --- a/lib/api/element-commands/updateValue.js +++ b/lib/api/element-commands/updateValue.js @@ -3,7 +3,7 @@ const BaseElementCommand = require('./_baseElementCommand.js'); /** * 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. * - *
updateValue is equivalent with setValue and sendKeys with the exception that it clears the value beforehand.
+ *
updateValue is equivalent with setValue in that it also clears the value beforehand.
* * An object map with available keys and their respective UTF-8 characters, as defined on [W3C WebDriver draft spec](https://www.w3.org/TR/webdriver/#character-types), is loaded onto the main Nightwatch instance as `browser.Keys`. * diff --git a/lib/api/web-element/commands/setValue.js b/lib/api/web-element/commands/setValue.js index 44cd42499..ec249246a 100644 --- a/lib/api/web-element/commands/setValue.js +++ b/lib/api/web-element/commands/setValue.js @@ -1,7 +1,7 @@ /** * 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. * - *
From Nightwatch v2, setValue also clears the existing value of the element by calling the clearValue() beforehand.
+ *
setValue 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](https://www.w3.org/TR/webdriver/#character-types), is loaded onto the main Nightwatch instance as `browser.Keys`. * diff --git a/lib/api/web-element/commands/update.js b/lib/api/web-element/commands/update.js index 8827ef951..c815e1dd6 100644 --- a/lib/api/web-element/commands/update.js +++ b/lib/api/web-element/commands/update.js @@ -1,6 +1,8 @@ /** * 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](https://www.w3.org/TR/webdriver/#character-types), 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.