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

Fixed W3C WebDriver Spec links in API docs. #4166

Merged
merged 13 commits into from
May 27, 2024
2 changes: 1 addition & 1 deletion lib/api/client-commands/document/source.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const ClientCommand = require('../_base-command.js');
* @method document.source
* @param {function} [callback] Callback function which is called with the result value.
* @returns {string} String serialized source of the current page.
* @link https://www.w3.org/TR/webdriver#getting-page-source
* @link /#get-page-source
* @api protocol.document
*/
class Source extends ClientCommand {
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 @@ -42,7 +42,7 @@ const BaseElementCommand = require('./_baseElementCommand.js');
* @param {string} selector The CSS/Xpath selector used to locate the element.
* @param {function} [callback] Optional callback function to be called when the command finishes.
* @api protocol.elementinteraction
* @link /#dfn-element-clickAndHold
* @see https://www.selenium.dev/documentation/webdriver/actions_api/mouse/#click-and-hold
garg3133 marked this conversation as resolved.
Show resolved Hide resolved
* @since 2.0.0
*/
class ClickAndHold extends BaseElementCommand {
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 @@ -42,7 +42,7 @@ const BaseElementCommand = require('./_baseElementCommand.js');
* @param {string} selector The CSS/Xpath selector used to locate the element.
* @param {function} [callback] Optional callback function to be called when the command finishes.
* @api protocol.elementinteraction
* @link /#dfn-element-doubleClick
* @see https://www.selenium.dev/documentation/webdriver/actions_api/mouse/#double-click
*/
class doubleClick extends BaseElementCommand {
get extraArgsCount() {
Expand Down
2 changes: 1 addition & 1 deletion lib/api/element-commands/getValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const BaseElementCommand = require('./_baseElementCommand.js');
* @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 {function} callback Callback function which is called with the result value.
* @returns {string} The element's value.
* @link /#dfn-get-element-tag-name
* @link /#get-element-property
* @api protocol.elementstate
*/
class GetValue extends BaseElementCommand {
Expand Down
2 changes: 1 addition & 1 deletion lib/api/element-commands/rightClick.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const BaseElementCommand = require('./_baseElementCommand.js');
* @param {function} [callback] Optional callback function to be called when the command finishes.
* @api protocol.elementinteraction
* @since 2.0.0
* @link /#dfn-element-rightClick
* @see https://www.selenium.dev/documentation/webdriver/actions_api/mouse/#context-click
*/
class RightClick extends BaseElementCommand {
get extraArgsCount() {
Expand Down
4 changes: 2 additions & 2 deletions lib/api/web-element/commands/clear.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
* @memberof ScopedWebElement
* @instance
* @syntax browser.element(selector).clear()
* @see https://www.w3.org/TR/webdriver#dfn-element-clear
* @link /#dfn-element-clear
* @returns {ScopedWebElement}
*/
module.exports.command = function() {
module.exports.command = function () {
return this.runQueuedCommand('clearElementValue');
};
4 changes: 2 additions & 2 deletions lib/api/web-element/commands/click.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
* @memberof ScopedWebElement
* @instance
* @syntax browser.element(selector).click()
* @see https://www.w3.org/TR/webdriver#dfn-element-click
* @link /#dfn-element-click
* @returns {ScopedWebElement}
*/
module.exports.command = function() {
module.exports.command = function () {
garg3133 marked this conversation as resolved.
Show resolved Hide resolved
return this.runQueuedCommand('clickElement');
};
4 changes: 2 additions & 2 deletions lib/api/web-element/commands/clickAndHold.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
* @memberof ScopedWebElement
* @instance
* @syntax browser.element(selector).clickAndHold()
* @see https://www.w3.org/TR/webdriver#dfn-element-clickAndHold
* @see https://www.selenium.dev/documentation/webdriver/actions_api/mouse/#click-and-hold
* @returns {ScopedWebElement}
*/
module.exports.command = function() {
module.exports.command = function () {
return this.runQueuedCommand('pressAndHold');
};
4 changes: 2 additions & 2 deletions lib/api/web-element/commands/doubleClick.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
* @memberof ScopedWebElement
* @instance
* @syntax browser.element(selector).doubleClick()
* @see https://www.w3.org/TR/webdriver#dfn-element-doubleClick
* @see https://www.selenium.dev/documentation/webdriver/actions_api/mouse/#double-click
* @returns {ScopedWebElement}
*/
module.exports.command = function() {
module.exports.command = function () {
return this.runQueuedCommand('doubleClick');
};
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/getAccessibleName.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* @memberof ScopedWebElement
* @instance
* @syntax browser.element(selector).getAccessibleName()
* @see https://www.w3.org/TR/webdriver#dfn-get-computed-label
* @link /#get-computed-label
* @returns {ScopedValue<string>} A container with accessible name of an element.
*/
module.exports.command = function() {
Expand Down
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/getAriaRole.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* @memberof ScopedWebElement
* @instance
* @syntax browser.element(selector).getAriaRole()
* @see https://www.w3.org/TR/webdriver#dfn-get-computed-role
* @link /#get-computed-role
* @returns {ScopedValue<string>} The container with computed WAI-ARIA role of an element.
*/
module.exports.command = function() {
Expand Down
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/getAttribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @memberof ScopedWebElement
* @instance
* @syntax browser.element(selector).getAttribute(name)
* @see https://www.w3.org/TR/webdriver#dfn-get-element-attribute
* @link /#get-element-attribute
* @param {string} name The attribute name to inspect.
* @returns {ScopedValue<string | null>} The value of the attribute
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/getCssProperty.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* @memberof ScopedWebElement
* @instance
* @syntax browser.element(selector).getCssProperty(name)
* @see https://www.w3.org/TR/webdriver#get-element-css-value
* @link /#get-element-css-value
* @param {string} cssProperty The CSS property to inspect.
* @returns {ScopedValue<string>} The container with a value of the css property
*/
Expand Down
4 changes: 2 additions & 2 deletions lib/api/web-element/commands/getProperty.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
* @param {string} name element property
* @instance
* @syntax browser.element(selector).getProperty(name)
* @see https://www.w3.org/TR/webdriver#get-element-property
* @link /#get-element-property
* @returns {ScopedValue<string>}
*/
module.exports.command = function(name) {
module.exports.command = function (name) {
garg3133 marked this conversation as resolved.
Show resolved Hide resolved
return this.runQueuedCommandScoped('getElementProperty', name);
};
4 changes: 2 additions & 2 deletions lib/api/web-element/commands/getRect.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
* @memberof ScopedWebElement
* @instance
* @syntax browser.element(selector).getRect()
* @see https://www.w3.org/TR/webdriver#dfn-get-element-rect
* @link /#dfn-get-element-rect
* @returns {ScopedValue<{ width: number, height: number }>}
* @alias getSize
* @alias getLocation
*/
module.exports.command = function() {
module.exports.command = function () {
garg3133 marked this conversation as resolved.
Show resolved Hide resolved
return this.runQueuedCommandScoped('getElementRect');
};
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/getTagName.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* @memberof ScopedWebElement
* @instance
* @syntax browser.element(selector).getTagName()
* @see https://www.w3.org/TR/webdriver#dfn-get-element-tag-name
* @link /#get-element-tag-name
* @returns {ScopedValue<string>}
*/
module.exports.command = function() {
Expand Down
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/getText.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @memberof ScopedWebElement
* @instance
* @syntax browser.element(selector).getText()
* @see https://www.w3.org/TR/webdriver#dfn-get-element-text
* @link /#get-element-text
* @returns {ScopedValue<string>}
*/
module.exports.command = function() {
Expand Down
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/getValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* @memberof ScopedWebElement
* @instance
* @syntax browser.element(selector).getValue()
* @see https://www.w3.org/TR/webdriver#dfn-get-element-tag-name
* @link /#get-element-property
* @returns {ScopedValue<string>}
*/
module.exports.command = function () {
Expand Down
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/isEnabled.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @memberof ScopedWebElement
* @instance
* @syntax browser.element(selector).isEnabled()
* @see https://www.w3.org/TR/webdriver/#is-element-enabled
* @link /#is-element-enabled
* @returns {ScopedValue<boolean>}
*/
module.exports.command = function () {
Expand Down
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/isSelected.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @memberof ScopedWebElement
* @instance
* @syntax browser.element(selector).isSelected()
* @see https://www.w3.org/TR/webdriver/#is-element-selected
* @link /#is-element-selected
* @returns {ScopedValue<boolean>}
*/
module.exports.command = function () {
Expand Down
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/isVisible.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* @memberof ScopedWebElement
* @instance
* @syntax browser.element(selector).isVisible()
* @see https://www.w3.org/TR/webdriver/#element-displayedness
* @link /#element-displayedness
* @returns {ScopedValue<boolean>}
* @alias isDisplayed
*/
Expand Down
4 changes: 2 additions & 2 deletions lib/api/web-element/commands/rightClick.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
* @memberof ScopedWebElement
* @instance
* @syntax browser.element(selector).rightClick()
* @see https://www.w3.org/TR/webdriver#dfn-element-rightclick
* @see https://www.selenium.dev/documentation/webdriver/actions_api/mouse/#context-click
* @returns {ScopedWebElement}
*/
module.exports.command = function() {
module.exports.command = function () {
return this.runQueuedCommand('contextClick');
};
3 changes: 2 additions & 1 deletion lib/api/web-element/commands/sendKeys.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@
* @instance
* @syntax browser.element(selector).sendKeys(...keys)
* @param {...string} keys
* @link /#element-send-keys
* @see https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/index_exports_WebElement.html#sendKeys
garg3133 marked this conversation as resolved.
Show resolved Hide resolved
* @returns {ScopedWebElement}
*/
module.exports.command = function(...args) {
module.exports.command = function (...args) {
garg3133 marked this conversation as resolved.
Show resolved Hide resolved
const keys = args.reduce((prev, key) => {
const keyList = Array.isArray(key) ? key : [key];
prev.push(...keyList);
Expand Down
4 changes: 2 additions & 2 deletions lib/api/web-element/commands/takeScreenshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
* @memberof ScopedWebElement
* @instance
* @syntax browser.element(selector).takeScreenshot()
* @see https://www.w3.org/TR/webdriver#dfn-take-element-screenshot
* @link /#dfn-take-element-screenshot
* @returns {ScopedValue<string>}
*/
module.exports.command = function() {
module.exports.command = function () {
garg3133 marked this conversation as resolved.
Show resolved Hide resolved
return this.runQueuedCommandScoped('takeElementScreenshot');
};
4 changes: 2 additions & 2 deletions lib/api/web-element/commands/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
* @instance
* @syntax browser.element(selector).update(characters, ...keys)
* @param {...string} keys
* @see https://www.w3.org/TR/webdriver#element-send-keys
* @link /#element-send-keys
* @returns {ScopedWebElement}
*/
module.exports.command = function(...args) {
module.exports.command = function (...args) {
garg3133 marked this conversation as resolved.
Show resolved Hide resolved
const keys = args.reduce((prev, key) => {
const keyList = Array.isArray(key) ? key : [key];
prev.push(...keyList);
Expand Down
Loading