Skip to content

Commit

Permalink
Fix selector object doc links in API docs. (nightwatchjs#4226)
Browse files Browse the repository at this point in the history
  • Loading branch information
garg3133 authored and dikwickley committed Oct 15, 2024
1 parent 15fee17 commit 3e736c6
Show file tree
Hide file tree
Showing 61 changed files with 98 additions and 98 deletions.
2 changes: 1 addition & 1 deletion lib/api/assertions/attributeContains.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* };
*
* @method assert.attributeContains
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide#element-properties).
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties).
* @param {string} attribute The attribute name
* @param {string} expected The expected contained value of the attribute to check.
* @param {string} [msg] Optional log message to display in the output. If missing, one is displayed by default.
Expand Down
2 changes: 1 addition & 1 deletion lib/api/assertions/attributeEquals.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* };
*
* @method assert.attributeEquals
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide#element-properties).
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties).
* @param {string} attribute The attribute name
* @param {string} expected The expected value of the attribute to check.
* @param {string} [msg] Optional log message to display in the output. If missing, one is displayed by default.
Expand Down
2 changes: 1 addition & 1 deletion lib/api/assertions/attributeMatches.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* };
*
* @method assert.attributeMatches
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide#element-properties).
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties).
* @param {string} attribute The attribute name
* @param {string|RegExp} regexExpression Regex expression to match attribute value.
* @param {string} [msg] Optional log message to display in the output. If missing, one is displayed by default.
Expand Down
2 changes: 1 addition & 1 deletion lib/api/assertions/containsText.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* ```
*
* @method assert.containsText
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide#element-properties).
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties).
* @param {string} expectedText The text to look for.
* @param {string} [msg] Optional log message to display in the output. If missing, one is displayed by default.
* @api assertions
Expand Down
4 changes: 2 additions & 2 deletions lib/api/assertions/cssClassPresent.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* ```
*
* @method assert.cssClassPresent
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide#element-properties).
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties).
* @param {string} className The CSS class to look for.
* @param {string} [msg] Optional log message to display in the output. If missing, one is displayed by default.
* @api assertions
Expand All @@ -32,7 +32,7 @@ exports.assertion = function(definition, expected, msg) {
'removed from future versions. Use assert.hasClass().');

this.formatMessage = function() {
let message = msg || `Testing if element %s ${this.negate ? 'doesn\'t have css class %s' : 'has css class %s'}`;
const message = msg || `Testing if element %s ${this.negate ? 'doesn\'t have css class %s' : 'has css class %s'}`;

return {
message,
Expand Down
4 changes: 2 additions & 2 deletions lib/api/assertions/cssProperty.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* };
*
* @method assert.cssProperty
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide#element-properties).
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties).
* @param {string} cssProperty The CSS property.
* @param {string} expected The expected value of the css property to check.
* @param {string} [msg] Optional log message to display in the output. If missing, one is displayed by default.
Expand All @@ -21,7 +21,7 @@ exports.assertion = function(definition, cssProperty, expected, msg) {
};

this.formatMessage = function() {
let message = msg || `Testing if element %s ${this.negate ? 'doesn\'t have css property %s: %s' : 'has css property %s: %s'}`;
const message = msg || `Testing if element %s ${this.negate ? 'doesn\'t have css property %s: %s' : 'has css property %s: %s'}`;

return {
message,
Expand Down
2 changes: 1 addition & 1 deletion lib/api/assertions/domPropertyContains.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* };
*
* @method assert.domPropertyContains
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide#element-properties).
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties).
* @param {string} domProperty The DOM property name.
* @param {string} expected The expected value of the DOM property to check.
* @param {string} [msg] Optional log message to display in the output. If missing, one is displayed by default.
Expand Down
2 changes: 1 addition & 1 deletion lib/api/assertions/domPropertyEquals.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* };
*
* @method assert.domPropertyEquals
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide#element-properties).
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties).
* @param {string} domProperty The DOM property name.
* @param {string} expected The expected value of the DOM property to check.
* @param {string} [msg] Optional log message to display in the output. If missing, one is displayed by default.
Expand Down
2 changes: 1 addition & 1 deletion lib/api/assertions/domPropertyMatches.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* }
*
* @method assert.domPropertyMatches
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide#element-properties).
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties).
* @param {string} domProperty The DOM property name.
* @param {string|RegExp} regexExpression Regex to match against.
* @param {string} [msg] Optional log message to display in the output. If missing, one is displayed by default.
Expand Down
2 changes: 1 addition & 1 deletion lib/api/assertions/elementPresent.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* };
*
* @method assert.elementPresent
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide#element-properties).
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties).
* @param {string} [message] Optional log message to display in the output. If missing, one is displayed by default.
* @api assertions
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/api/assertions/elementsCount.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* }
*
* @method assert.elementsCount
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide#element-properties).
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties).
* @param {string} count expected number of elements to be present.
* @param {string} [msg] Optional log message to display in the output. If missing, one is displayed by default.
* @api assertions
Expand Down
2 changes: 1 addition & 1 deletion lib/api/assertions/hasAttribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* };
*
* @method assert.hasAttribute
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide#element-properties).
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties).
* @param {string} expectedAttribute The DOM attribute to look for.
* @param {string} [msg] Optional log message to display in the output. If missing, one is displayed by default.
* @api assertions
Expand Down
2 changes: 1 addition & 1 deletion lib/api/assertions/hasClass.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* };
*
* @method hasClass
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide#element-properties).
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties).
* @param {string} className The CSS class to look for.
* @param {string} [msg] Optional log message to display in the output. If missing, one is displayed by default.
* @api assertions
Expand Down
2 changes: 1 addition & 1 deletion lib/api/assertions/hasDescendants.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* };
*
* @method assert.hasDescendants
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide#element-properties).
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties).
* @param {string} className The CSS class to look for.
* @param {string} [msg] Optional log message to display in the output. If missing, one is displayed by default.
* @api assertions
Expand Down
2 changes: 1 addition & 1 deletion lib/api/assertions/textContains.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* };
*
* @method assert.textContains
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide#element-properties).
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties).
* @param {string} expectedText The text to look for.
* @param {string} [msg] Optional log message to display in the output. If missing, one is displayed by default.
* @api assertions
Expand Down
2 changes: 1 addition & 1 deletion lib/api/assertions/textEquals.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* };
*
* @method assert.textEquals
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide#element-properties).
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties).
* @param {string} expected text to match text.
* @param {string} [msg] Optional log message to display in the output. If missing, one is displayed by default.
* @api assertions
Expand Down
2 changes: 1 addition & 1 deletion lib/api/assertions/textMatches.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* };
*
* @method assert.textMatches
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide#element-properties).
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties).
* @param {string|RegExp} regexExpression Regex expression to match text.
* @param {string} [msg] Optional log message to display in the output. If missing, one is displayed by default.
* @api assertions
Expand Down
2 changes: 1 addition & 1 deletion lib/api/assertions/value.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* ```
*
* @method value
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide#element-properties).
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties).
* @param {string} expected The expected text.
* @param {string} [msg] Optional log message to display in the output. If missing, one is displayed by default.
* @api assertions
Expand Down
2 changes: 1 addition & 1 deletion lib/api/assertions/valueContains.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* };
*
* @method assert.valueContains
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide#element-properties).
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties).
* @param {string} expected The expected text.
* @param {string} [msg] Optional log message to display in the output. If missing, one is displayed by default.
* @api assertions
Expand Down
2 changes: 1 addition & 1 deletion lib/api/assertions/valueEquals.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* };
*
* @method assert.valueEquals
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide#element-properties).
* @param {string|object} definition The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties).
* @param {string} expected The expected text.
* @param {string} [msg] Optional log message to display in the output. If missing, one is displayed by default.
* @api assertions
Expand Down
2 changes: 1 addition & 1 deletion lib/api/client-commands/within.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* @method within
* @syntax browser.within('#element').click('button');
* @param {string|object} selector The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide#element-properties).
* @param {string|object} selector The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties).
* @api protocol.elements
* @since 2.5.5
*/
Expand Down
4 changes: 2 additions & 2 deletions lib/api/element-commands/clearValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const BaseElementCommand = require('./_baseElementCommand.js');
* // with explicit locate strategy
* browser.clearValue('css selector', '#login input[type=text]');
*
* // with selector object - see https://nightwatchjs.org/guide#element-properties
* // with selector object - see https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties
* browser.clearValue({
* selector: '#login input[type=text]',
* index: 1,
Expand All @@ -35,7 +35,7 @@ const BaseElementCommand = require('./_baseElementCommand.js');
* // using global element()
* browser.clearValue(element('<SELECTOR>'))
* @param {string} [using] The locator strategy to use. See [W3C Webdriver - locator strategies](https://www.w3.org/TR/webdriver/#locator-strategies)
* @param {string|object} selector The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide#element-properties).
* @param {string|object} selector The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies [element properties](https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties).
* @param {function} [callback] Optional callback function to be called when the command finishes.
* @api protocol.elementinteraction
* @link /#dfn-element-clear
Expand Down
2 changes: 1 addition & 1 deletion lib/api/element-commands/click.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const BaseElementCommand = require('./_baseElementCommand.js');
* // with explicit locate strategy
* browser.click('css selector', '#main ul li a.first');
*
* // with selector object - see https://nightwatchjs.org/guide#element-properties
* // with selector object - see https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties
* browser.click({
* selector: '#main ul li a',
* index: 1,
Expand Down
2 changes: 1 addition & 1 deletion lib/api/element-commands/clickAndHold.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const BaseElementCommand = require('./_baseElementCommand.js');
* // with explicit locate strategy
* browser.clickAndHold('css selector', '#main ul li a.first');
*
* // with selector object - see https://nightwatchjs.org/guide#element-properties
* // with selector object - see https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties
* browser.clickAndHold({
* selector: '#main ul li a',
* index: 1,
Expand Down
2 changes: 1 addition & 1 deletion lib/api/element-commands/doubleClick.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const BaseElementCommand = require('./_baseElementCommand.js');
* // with explicit locate strategy
* browser.doubleClick('css selector', '#main ul li a.first');
*
* // with selector object - see https://nightwatchjs.org/guide#element-properties
* // with selector object - see https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties
* browser.doubleClick({
* selector: '#main ul li a',
* index: 1,
Expand Down
2 changes: 1 addition & 1 deletion lib/api/element-commands/getAccessibleName.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const BaseElementCommand = require('./_baseElementCommand.js');
* console.log('getAccessibleName result', result.value);
* });
*
* // with selector object - see https://nightwatchjs.org/guide#element-properties
* // with selector object - see https://nightwatchjs.org/guide/writing-tests/finding-interacting-with-dom-elements.html#postdoc-element-properties
* browser.getAccessibleName({
* selector: '*[name="search"]',
* index: 1
Expand Down
Loading

0 comments on commit 3e736c6

Please sign in to comment.