Skip to content

Commit 270ecbb

Browse files
committed
Refactor JSDoc for isPresent command.
1 parent 99637d8 commit 270ecbb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/api/web-element/commands/isPresent.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
/**
22
* Checks if an element is present in the DOM.
33
*
4-
* This command is useful for verifying the presence of elements that may not be visible or interactable.
4+
* This command is useful for verifying the presence of elements that may/may not be visible or interactable.
55
*
6-
* For more information on working with DOM elements in Nightwatch, refer to the <a href="https://nightwatchjs.org/guide/working-with-page-elements/finding-elements.html">Finding Elements</a> guide page.
6+
* 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.
7+
* For more info on the new `browser.element.find()` syntax, refer to the <a href="/api/element/"> new Element API Overview </a> page.
78
*
89
* @example
910
* describe('isPresent Demo', function() {
1011
* it('test isPresent', function(browser) {
11-
* browser.element('#search')
12+
* browser.element.find('#search')
1213
* .isPresent()
1314
* .assert.equals(true);
1415
* });
1516
*
1617
* it('test async isPresent', async function(browser) {
17-
* const result = await browser.element('#search').isPresent();
18+
* const result = await browser.element.find('#search').isPresent();
1819
* browser.assert.equal(result, true);
1920
* });
2021
* });
@@ -23,7 +24,7 @@
2324
* @method isPresent
2425
* @memberof ScopedWebElement
2526
* @instance
26-
* @syntax browser.element(selector).isPresent()
27+
* @syntax browser.element.find(selector).isPresent()
2728
* @returns {ScopedValue<boolean>} A boolean value indicating if the element is present in the DOM.
2829
*/
2930

test/src/api/commands/web-element/testIsPresent.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const MockServer = require('../../../../lib/mockserver.js');
55
const CommandGlobals = require('../../../../lib/globals/commands-w3c.js');
66
const common = require('../../../../common.js');
77
const Element = common.require('element/index.js');
8-
const Utils = common.require('./utils');
98
const NightwatchClient = common.require('index.js');
109
const {settings} = common;
1110

0 commit comments

Comments
 (0)