Skip to content

Commit

Permalink
Small modifications in API docs for updating value. (nightwatchjs#4213)
Browse files Browse the repository at this point in the history
  • Loading branch information
garg3133 authored and dikwickley committed Oct 15, 2024
1 parent 6f8dae4 commit fe2839c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/api/element-commands/updateValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
* <div class="alert alert-warning"><strong>updateValue</strong> is equivalent with <strong>setValue</strong> and <strong>sendKeys</strong> with the exception that it clears the value beforehand.</div>
* <div class="alert alert-warning"><strong>updateValue</strong> is equivalent with <strong>setValue</strong> in that it also clears the value beforehand.</div>
*
* 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`.
*
Expand Down
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/setValue.js
Original file line number Diff line number Diff line change
@@ -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.
*
* <div class="alert alert-warning">From Nightwatch v2, <strong>setValue</strong> also clears the existing value of the element by calling the <strong>clearValue()</strong> beforehand.</div>
* <div class="alert alert-warning"><strong>setValue</strong> also clears the existing value of the element by calling the <strong>clear()</strong> beforehand.</div>
*
* 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`.
*
Expand Down
2 changes: 2 additions & 0 deletions lib/api/web-element/commands/update.js
Original file line number Diff line number Diff line change
@@ -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.
*
* <div class="alert alert-warning"><strong>update</strong> also clears the existing value of the element by calling the <strong>clear()</strong> beforehand.</div>
*
* 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 <a href="https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html">Finding & interacting with DOM Elements</a> guide page.
Expand Down

0 comments on commit fe2839c

Please sign in to comment.