Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small modifications in API docs for updating value. #4213

Merged
merged 1 commit into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading