From 1a394510584a490e6368aacb64423dbb31eabdd4 Mon Sep 17 00:00:00 2001 From: Savka Oleg Date: Thu, 24 Sep 2020 15:22:12 +0300 Subject: [PATCH] OI-1023 Command exceptions should be documented --- src/ox_modules/module-mob/commands/getBrowserLogs.js | 1 + src/ox_modules/module-mob/commands/getDeviceLogs.js | 1 + src/ox_modules/module-mob/commands/smsGetText.js | 1 + src/ox_modules/module-web.js | 4 ++++ src/ox_modules/module-web/commands/fileBrowse.js | 1 + src/ox_modules/module-web/commands/getBrowserLogs.js | 1 + src/ox_modules/module-web/commands/getXMLPageSource.js | 1 + src/ox_modules/module-web/commands/pointJS.js | 1 + 8 files changed, 11 insertions(+) diff --git a/src/ox_modules/module-mob/commands/getBrowserLogs.js b/src/ox_modules/module-mob/commands/getBrowserLogs.js index b5f9cee8..5f6682d3 100644 --- a/src/ox_modules/module-mob/commands/getBrowserLogs.js +++ b/src/ox_modules/module-mob/commands/getBrowserLogs.js @@ -10,6 +10,7 @@ /** * @function getBrowserLogs * @summary Collects browser logs from the mobile device. + * @description Supports only for Android * @return {Object[]} A list of logs. * @for android, ios, hybrid, web * @example [javascript] Usage example diff --git a/src/ox_modules/module-mob/commands/getDeviceLogs.js b/src/ox_modules/module-mob/commands/getDeviceLogs.js index d7993d49..20cae232 100644 --- a/src/ox_modules/module-mob/commands/getDeviceLogs.js +++ b/src/ox_modules/module-mob/commands/getDeviceLogs.js @@ -10,6 +10,7 @@ /** * @function getDeviceLogs * @summary Collects logs from the mobile device. + * @description Supports only for Android * @return {Object[]} A list of logs. * @for android, ios, hybrid, web * @example [javascript] Usage example diff --git a/src/ox_modules/module-mob/commands/smsGetText.js b/src/ox_modules/module-mob/commands/smsGetText.js index feb6804b..4a31a063 100644 --- a/src/ox_modules/module-mob/commands/smsGetText.js +++ b/src/ox_modules/module-mob/commands/smsGetText.js @@ -11,6 +11,7 @@ * @summary Gets SMS text on Android phone. * @description `SMSPopup` application must be installed and running on the device to use this command. * https://github.com/oxygenhq/android-smspopup/releases + * Supports only for Android * @function smsGetText * @param {Number=} timeout - Time in milliseconds to wait for sms popup. Default is 60 seconds. * @return {String} - SMS text. diff --git a/src/ox_modules/module-web.js b/src/ox_modules/module-web.js index a929312b..c0f62e2d 100644 --- a/src/ox_modules/module-web.js +++ b/src/ox_modules/module-web.js @@ -104,6 +104,10 @@ export default class WebModule extends WebDriverModule { /** * @function init * @summary Initializes new Selenium session. + * @description + * Record HAR only for chrome + * Collect browser logs only for chrome + * Don't run maximizeWindow and setTimeout commands for MicrosoftEdge * @param {String=} caps - Desired capabilities. If not specified capabilities will be taken from suite definition. * @param {String=} seleniumUrl - Remote server URL (default: http://localhost:4444/wd/hub). */ diff --git a/src/ox_modules/module-web/commands/fileBrowse.js b/src/ox_modules/module-web/commands/fileBrowse.js index 52343276..bec8edcd 100644 --- a/src/ox_modules/module-web/commands/fileBrowse.js +++ b/src/ox_modules/module-web/commands/fileBrowse.js @@ -9,6 +9,7 @@ /** * @summary Uploads a local file + * @description Can crush driver * @function fileBrowse * @param {String|Element} locator - Locator for a `input type=file` element. * @param {String} filepath - Path to a local file. diff --git a/src/ox_modules/module-web/commands/getBrowserLogs.js b/src/ox_modules/module-web/commands/getBrowserLogs.js index 302cb2fa..0b2f0c21 100644 --- a/src/ox_modules/module-web/commands/getBrowserLogs.js +++ b/src/ox_modules/module-web/commands/getBrowserLogs.js @@ -10,6 +10,7 @@ /** * @function getBrowserLogs * @summary Collects logs from the browser console. + * @description Collect browser logs only for chrome * @return {Object[]} An array of browser console logs. * @for chrome * @example [javascript] Usage example diff --git a/src/ox_modules/module-web/commands/getXMLPageSource.js b/src/ox_modules/module-web/commands/getXMLPageSource.js index 90b3dd3d..de3a3b8d 100644 --- a/src/ox_modules/module-web/commands/getXMLPageSource.js +++ b/src/ox_modules/module-web/commands/getXMLPageSource.js @@ -9,6 +9,7 @@ /** * @summary Gets the source of the currently active window which displays `text/xml` page. + * @description Support only chrome and ie * @function getXMLPageSource * @return {String} The XML page source. * @example [javascript] Usage example diff --git a/src/ox_modules/module-web/commands/pointJS.js b/src/ox_modules/module-web/commands/pointJS.js index 14817ad2..7281e8df 100644 --- a/src/ox_modules/module-web/commands/pointJS.js +++ b/src/ox_modules/module-web/commands/pointJS.js @@ -11,6 +11,7 @@ * @summary Points the mouse cursor over the specified element. * @description This method is similar to `web.point`, however it simulates the action using * JavaScript instead of using WebDriver's functionality which doesn't work in all cases. + * Don't support IE < 9 * @function pointJS * @param {String|Element} locator - An element locator. * @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.