-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Added return type as scopedvalue and removed unwanted changes
1 parent
c990fc6
commit 73b21ac
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* Returns true if the element is visisble. | ||
* | ||
* 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. | ||
* | ||
* @example | ||
* export default { | ||
* demoTest(browser: NightwatchAPI): void { | ||
* const result = browser.element('#main ul li a.first').isVisible(); | ||
* .assert.valueEquals('custom text'); | ||
* }, | ||
* | ||
* async demoTestAsync(browser: NightwatchAPI): Promise<void> { | ||
* const result = await browser.element('#main ul li a.first').isVisible(); | ||
* console.log('element text:', result); | ||
* } | ||
* } | ||
* | ||
* @since 3.0.0 | ||
* @method isVisible | ||
* @memberof ScopedWebElement | ||
* @instance | ||
* @syntax browser.element(selector).isVisible() | ||
* @see https://www.w3.org/TR/webdriver#dfn-get-element-text | ||
* @returns {ScopedValue<string>} | ||
*/ | ||
module.exports.command = function() { | ||
return this.runQueuedCommandScoped('isElementDisplayed'); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters