From 6701793c4719816f689291ff348092bbf57321ed Mon Sep 17 00:00:00 2001 From: Priyansh Garg Date: Wed, 17 Apr 2024 21:13:31 +0530 Subject: [PATCH] Add comments and fix JSDoc. --- lib/api/_loaders/element-api.js | 1 + lib/api/client-commands/axeInject.js | 1 + lib/api/client-commands/axeRun.js | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/api/_loaders/element-api.js b/lib/api/_loaders/element-api.js index 6b4314448f..ad33f35d78 100644 --- a/lib/api/_loaders/element-api.js +++ b/lib/api/_loaders/element-api.js @@ -5,6 +5,7 @@ const {By} = require('selenium-webdriver'); class ScopedElementAPILoader { static get availableElementCommands() { + // commands directly available on `browser.element` return [ ['findElement', 'find', 'get'], ['findAll'], diff --git a/lib/api/client-commands/axeInject.js b/lib/api/client-commands/axeInject.js index 7d3c1d97ea..f7ba054407 100644 --- a/lib/api/client-commands/axeInject.js +++ b/lib/api/client-commands/axeInject.js @@ -1,5 +1,6 @@ /** * Injects the [axe-core](https://github.com/dequelabs/axe-core) js library into the current page (using the `.executeScript()` command). + * * To be paired with `.axeRun()` to evaluate the axe-core accessibility rules. * * @example diff --git a/lib/api/client-commands/axeRun.js b/lib/api/client-commands/axeRun.js index 4b2b551979..e1129ba9d0 100644 --- a/lib/api/client-commands/axeRun.js +++ b/lib/api/client-commands/axeRun.js @@ -16,7 +16,7 @@ * * @method axeRun * @syntax browser.axeRun('body') - * @param {*} [context] Defines the scope of the analysis, will cascade to child elements. See [axe-core docs](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#context-parameter) for more details. + * @param {any} [context] Defines the scope of the analysis, will cascade to child elements. See [axe-core docs](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#context-parameter) for more details. * @param {object} [options] Object containing rules configuration to use when performing the analysis. See [axe-core docs](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#options-parameter) for more details. * @param {function} [callback] Optional callback function which is called with the results. * @api protocol.accessibility