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 /#getting-page-source
garg3133 marked this conversation as resolved.
Show resolved Hide resolved
* @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/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/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');
};
4 changes: 2 additions & 2 deletions lib/api/web-element/commands/sendKeys.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
* @instance
* @syntax browser.element(selector).sendKeys(...keys)
* @param {...string} 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
* @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
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