oxygen-cli 1.37.7 → 1.37.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1687 -1682
- package/LICENSE +672 -672
- package/README.md +37 -37
- package/build/core/OxygenCore.js +8 -2
- package/build/core/OxygenEvents.js +4 -2
- package/build/core/OxygenModule.js +1 -1
- package/build/core/OxygenService.js +1 -1
- package/build/core/OxygenSubModule.js +1 -1
- package/build/core/WebDriverModule.js +1 -1
- package/build/core/utils.js +1 -1
- package/build/errors/HookError.js +1 -1
- package/build/errors/ModuleError.js +1 -1
- package/build/errors/ModuleUnavailableError.js +1 -1
- package/build/errors/OxygenError.js +1 -1
- package/build/errors/ScriptNotFound.js +1 -1
- package/build/errors/helper.js +1 -1
- package/build/index.js +1 -1
- package/build/lib/cli-util.js +25 -6
- package/build/lib/cli.js +2 -2
- package/build/lib/debugger.js +1 -1
- package/build/lib/img-merge.js +1 -1
- package/build/lib/launcher.js +1 -1
- package/build/lib/logger.js +43 -43
- package/build/lib/moduleRequire.js +1 -1
- package/build/lib/parallel-launcher.js +1 -1
- package/build/lib/param-manager.js +1 -1
- package/build/lib/param-reader-csv.js +1 -1
- package/build/lib/param-reader-excel.js +1 -1
- package/build/lib/param-reader-json.js +1 -1
- package/build/lib/text-to-image.js +1 -1
- package/build/lib/util.js +2 -2
- package/build/model/case-result.js +1 -1
- package/build/model/failure.js +1 -1
- package/build/model/status.js +1 -1
- package/build/model/step-result.js +1 -1
- package/build/model/suite-result.js +2 -1
- package/build/model/test-result.js +1 -1
- package/build/model/testcase.js +1 -1
- package/build/model/testsuite.js +1 -1
- package/build/ox_modules/index.js +1 -1
- package/build/ox_modules/module-assert.js +37 -37
- package/build/ox_modules/module-date.js +24 -24
- package/build/ox_modules/module-db.js +52 -52
- package/build/ox_modules/module-email.js +59 -59
- package/build/ox_modules/module-eyes.js +34 -34
- package/build/ox_modules/module-http/ntlm-util.js +10 -10
- package/build/ox_modules/module-http/ntlm.js +15 -15
- package/build/ox_modules/module-http.js +132 -132
- package/build/ox_modules/module-log.js +27 -27
- package/build/ox_modules/module-mailinator.js +87 -87
- package/build/ox_modules/module-mob/commands/alertAccept.js +17 -17
- package/build/ox_modules/module-mob/commands/alertDismiss.js +17 -17
- package/build/ox_modules/module-mob/commands/assertAlert.js +20 -20
- package/build/ox_modules/module-mob/commands/assertText.js +21 -21
- package/build/ox_modules/module-mob/commands/assertTitle.js +19 -19
- package/build/ox_modules/module-mob/commands/assertValue.js +18 -18
- package/build/ox_modules/module-mob/commands/back.js +16 -16
- package/build/ox_modules/module-mob/commands/clear.js +19 -19
- package/build/ox_modules/module-mob/commands/click.js +17 -17
- package/build/ox_modules/module-mob/commands/clickHidden.js +17 -17
- package/build/ox_modules/module-mob/commands/clickLong.js +18 -18
- package/build/ox_modules/module-mob/commands/clickMultipleTimes.js +18 -18
- package/build/ox_modules/module-mob/commands/closeApp.js +16 -16
- package/build/ox_modules/module-mob/commands/debug.js +16 -16
- package/build/ox_modules/module-mob/commands/dragAndDrop.js +19 -19
- package/build/ox_modules/module-mob/commands/enableNetwork.js +27 -27
- package/build/ox_modules/module-mob/commands/execute.js +21 -21
- package/build/ox_modules/module-mob/commands/findElement.js +20 -20
- package/build/ox_modules/module-mob/commands/findElements.js +23 -23
- package/build/ox_modules/module-mob/commands/getAlertText.js +17 -17
- package/build/ox_modules/module-mob/commands/getAppiumLogs.js +16 -16
- package/build/ox_modules/module-mob/commands/getBrowserLogs.js +16 -16
- package/build/ox_modules/module-mob/commands/getCurrentActivity.js +15 -15
- package/build/ox_modules/module-mob/commands/getCurrentPackage.js +15 -15
- package/build/ox_modules/module-mob/commands/getDeviceLogs.js +16 -16
- package/build/ox_modules/module-mob/commands/getDeviceTime.js +16 -16
- package/build/ox_modules/module-mob/commands/getLocation.js +20 -20
- package/build/ox_modules/module-mob/commands/getSource.js +16 -16
- package/build/ox_modules/module-mob/commands/getText.js +18 -18
- package/build/ox_modules/module-mob/commands/getTitle.js +13 -13
- package/build/ox_modules/module-mob/commands/getUrl.js +17 -17
- package/build/ox_modules/module-mob/commands/getValue.js +18 -18
- package/build/ox_modules/module-mob/commands/getWindowHandles.js +17 -17
- package/build/ox_modules/module-mob/commands/hideKeyboard.js +21 -21
- package/build/ox_modules/module-mob/commands/index.js +1 -1
- package/build/ox_modules/module-mob/commands/installApp.js +16 -16
- package/build/ox_modules/module-mob/commands/isAppInstalled.js +16 -16
- package/build/ox_modules/module-mob/commands/isCheckable.js +18 -18
- package/build/ox_modules/module-mob/commands/isChecked.js +18 -18
- package/build/ox_modules/module-mob/commands/isClickable.js +18 -18
- package/build/ox_modules/module-mob/commands/isExist.js +19 -19
- package/build/ox_modules/module-mob/commands/isSelected.js +23 -23
- package/build/ox_modules/module-mob/commands/isVisible.js +19 -19
- package/build/ox_modules/module-mob/commands/isWebViewContext.js +16 -16
- package/build/ox_modules/module-mob/commands/launchApp.js +15 -15
- package/build/ox_modules/module-mob/commands/longPressKeyCode.js +18 -18
- package/build/ox_modules/module-mob/commands/open.js +17 -17
- package/build/ox_modules/module-mob/commands/pause.js +16 -16
- package/build/ox_modules/module-mob/commands/removeApp.js +16 -16
- package/build/ox_modules/module-mob/commands/resetApp.js +15 -15
- package/build/ox_modules/module-mob/commands/scrollIntoElement.js +22 -22
- package/build/ox_modules/module-mob/commands/scrollIntoView.js +27 -27
- package/build/ox_modules/module-mob/commands/select.js +24 -24
- package/build/ox_modules/module-mob/commands/selectFrame.js +23 -23
- package/build/ox_modules/module-mob/commands/selectWindow.js +28 -28
- package/build/ox_modules/module-mob/commands/sendKeys.js +29 -29
- package/build/ox_modules/module-mob/commands/setContext.js +16 -16
- package/build/ox_modules/module-mob/commands/setNativeContext.js +15 -15
- package/build/ox_modules/module-mob/commands/setTimeout.js +21 -21
- package/build/ox_modules/module-mob/commands/setWebViewContext.js +16 -16
- package/build/ox_modules/module-mob/commands/shake.js +16 -16
- package/build/ox_modules/module-mob/commands/smsClickLink.js +19 -19
- package/build/ox_modules/module-mob/commands/smsGetText.js +20 -20
- package/build/ox_modules/module-mob/commands/swipe.js +20 -20
- package/build/ox_modules/module-mob/commands/swipeElement.js +20 -20
- package/build/ox_modules/module-mob/commands/swipeScreen.js +20 -20
- package/build/ox_modules/module-mob/commands/takeScreenshot.js +17 -17
- package/build/ox_modules/module-mob/commands/tap.js +17 -17
- package/build/ox_modules/module-mob/commands/type.js +20 -20
- package/build/ox_modules/module-mob/commands/unlockPattern.js +22 -22
- package/build/ox_modules/module-mob/commands/waitForExist.js +18 -18
- package/build/ox_modules/module-mob/commands/waitForInteractable.js +17 -17
- package/build/ox_modules/module-mob/commands/waitForVisible.js +17 -17
- package/build/ox_modules/module-mob.js +83 -79
- package/build/ox_modules/module-pdf.js +35 -35
- package/build/ox_modules/module-proxy.js +77 -77
- package/build/ox_modules/module-serial.js +55 -55
- package/build/ox_modules/module-shell.js +25 -25
- package/build/ox_modules/module-soap.js +72 -72
- package/build/ox_modules/module-twilio.js +41 -41
- package/build/ox_modules/module-utils.js +91 -91
- package/build/ox_modules/module-web/commands/alertAccept.js +17 -17
- package/build/ox_modules/module-web/commands/alertDismiss.js +17 -17
- package/build/ox_modules/module-web/commands/assertAlert.js +20 -20
- package/build/ox_modules/module-web/commands/assertExist.js +17 -17
- package/build/ox_modules/module-web/commands/assertSelectedLabel.js +21 -21
- package/build/ox_modules/module-web/commands/assertSelectedValue.js +21 -21
- package/build/ox_modules/module-web/commands/assertText.js +21 -21
- package/build/ox_modules/module-web/commands/assertTextNotPresent.js +18 -18
- package/build/ox_modules/module-web/commands/assertTextPresent.js +18 -18
- package/build/ox_modules/module-web/commands/assertTitle.js +19 -19
- package/build/ox_modules/module-web/commands/assertValue.js +20 -20
- package/build/ox_modules/module-web/commands/back.js +16 -16
- package/build/ox_modules/module-web/commands/clear.js +18 -18
- package/build/ox_modules/module-web/commands/click.js +25 -25
- package/build/ox_modules/module-web/commands/clickHidden.js +23 -23
- package/build/ox_modules/module-web/commands/closeWindow.js +15 -15
- package/build/ox_modules/module-web/commands/debug.js +15 -15
- package/build/ox_modules/module-web/commands/deleteCookies.js +12 -12
- package/build/ox_modules/module-web/commands/deselect.js +22 -22
- package/build/ox_modules/module-web/commands/doubleClick.js +17 -17
- package/build/ox_modules/module-web/commands/dragAndDrop.js +20 -20
- package/build/ox_modules/module-web/commands/execute.js +24 -24
- package/build/ox_modules/module-web/commands/fileBrowse.js +18 -18
- package/build/ox_modules/module-web/commands/findElement.js +19 -19
- package/build/ox_modules/module-web/commands/findElements.js +22 -22
- package/build/ox_modules/module-web/commands/fullscreenWindow.js +14 -14
- package/build/ox_modules/module-web/commands/getAlertText.js +16 -16
- package/build/ox_modules/module-web/commands/getAttribute.js +19 -19
- package/build/ox_modules/module-web/commands/getBrowserLogs.js +17 -17
- package/build/ox_modules/module-web/commands/getCookies.js +13 -13
- package/build/ox_modules/module-web/commands/getCssValue.js +19 -19
- package/build/ox_modules/module-web/commands/getElementCount.js +17 -17
- package/build/ox_modules/module-web/commands/getHTML.js +17 -17
- package/build/ox_modules/module-web/commands/getSource.js +16 -16
- package/build/ox_modules/module-web/commands/getText.js +18 -18
- package/build/ox_modules/module-web/commands/getTitle.js +12 -12
- package/build/ox_modules/module-web/commands/getUrl.js +16 -16
- package/build/ox_modules/module-web/commands/getValue.js +18 -18
- package/build/ox_modules/module-web/commands/getWindowHandles.js +16 -16
- package/build/ox_modules/module-web/commands/getWindowSize.js +16 -16
- package/build/ox_modules/module-web/commands/getXMLPageSource.js +16 -16
- package/build/ox_modules/module-web/commands/index.js +1 -1
- package/build/ox_modules/module-web/commands/isAlertPresent.js +16 -16
- package/build/ox_modules/module-web/commands/isChecked.js +18 -18
- package/build/ox_modules/module-web/commands/isExist.js +19 -19
- package/build/ox_modules/module-web/commands/isInteractable.js +22 -22
- package/build/ox_modules/module-web/commands/isSelected.js +23 -23
- package/build/ox_modules/module-web/commands/isVisible.js +19 -19
- package/build/ox_modules/module-web/commands/makeVisible.js +25 -25
- package/build/ox_modules/module-web/commands/maximizeWindow.js +14 -14
- package/build/ox_modules/module-web/commands/minimizeWindow.js +14 -14
- package/build/ox_modules/module-web/commands/mock.js +20 -20
- package/build/ox_modules/module-web/commands/mockClearAll.js +12 -12
- package/build/ox_modules/module-web/commands/mockRestoreAll.js +12 -12
- package/build/ox_modules/module-web/commands/newWindow.js +16 -16
- package/build/ox_modules/module-web/commands/open.js +16 -16
- package/build/ox_modules/module-web/commands/pause.js +15 -15
- package/build/ox_modules/module-web/commands/point.js +21 -21
- package/build/ox_modules/module-web/commands/pointJS.js +15 -15
- package/build/ox_modules/module-web/commands/refresh.js +15 -15
- package/build/ox_modules/module-web/commands/rightClick.js +17 -17
- package/build/ox_modules/module-web/commands/rightClickActions.js +19 -19
- package/build/ox_modules/module-web/commands/scrollToElement.js +21 -21
- package/build/ox_modules/module-web/commands/select.js +23 -23
- package/build/ox_modules/module-web/commands/selectFrame.js +24 -24
- package/build/ox_modules/module-web/commands/selectWindow.js +27 -27
- package/build/ox_modules/module-web/commands/sendKeys.js +22 -22
- package/build/ox_modules/module-web/commands/setAutoWaitForAngular.js +20 -20
- package/build/ox_modules/module-web/commands/setTimeout.js +21 -21
- package/build/ox_modules/module-web/commands/setWindowSize.js +17 -17
- package/build/ox_modules/module-web/commands/takeScreenshot.js +17 -17
- package/build/ox_modules/module-web/commands/type.js +20 -20
- package/build/ox_modules/module-web/commands/verifyAlert.js +20 -20
- package/build/ox_modules/module-web/commands/verifyExist.js +17 -17
- package/build/ox_modules/module-web/commands/verifySelectedLabel.js +21 -21
- package/build/ox_modules/module-web/commands/verifySelectedValue.js +21 -21
- package/build/ox_modules/module-web/commands/verifyText.js +21 -21
- package/build/ox_modules/module-web/commands/verifyTextNotPresent.js +18 -18
- package/build/ox_modules/module-web/commands/verifyTextPresent.js +18 -18
- package/build/ox_modules/module-web/commands/verifyTitle.js +19 -19
- package/build/ox_modules/module-web/commands/verifyValue.js +20 -20
- package/build/ox_modules/module-web/commands/waitForAngular.js +19 -19
- package/build/ox_modules/module-web/commands/waitForExist.js +17 -17
- package/build/ox_modules/module-web/commands/waitForInteractable.js +17 -17
- package/build/ox_modules/module-web/commands/waitForNotExist.js +17 -17
- package/build/ox_modules/module-web/commands/waitForNotText.js +20 -20
- package/build/ox_modules/module-web/commands/waitForNotValue.js +20 -20
- package/build/ox_modules/module-web/commands/waitForText.js +20 -20
- package/build/ox_modules/module-web/commands/waitForValue.js +20 -20
- package/build/ox_modules/module-web/commands/waitForVisible.js +17 -17
- package/build/ox_modules/module-web/commands/waitForWindow.js +22 -22
- package/build/ox_modules/module-web.js +105 -100
- package/build/ox_modules/module-win/commands/assertText.js +17 -17
- package/build/ox_modules/module-win/commands/assertTitle.js +15 -15
- package/build/ox_modules/module-win/commands/assertValue.js +14 -14
- package/build/ox_modules/module-win/commands/back.js +11 -11
- package/build/ox_modules/module-win/commands/clear.js +13 -13
- package/build/ox_modules/module-win/commands/click.js +13 -13
- package/build/ox_modules/module-win/commands/clickLong.js +14 -14
- package/build/ox_modules/module-win/commands/clickMultipleTimes.js +14 -14
- package/build/ox_modules/module-win/commands/findElement.js +15 -15
- package/build/ox_modules/module-win/commands/findElements.js +15 -15
- package/build/ox_modules/module-win/commands/getAppiumLogs.js +12 -12
- package/build/ox_modules/module-win/commands/getCurrentWindowHandle.js +15 -15
- package/build/ox_modules/module-win/commands/getLocation.js +14 -14
- package/build/ox_modules/module-win/commands/getSource.js +12 -12
- package/build/ox_modules/module-win/commands/getText.js +14 -14
- package/build/ox_modules/module-win/commands/getValue.js +14 -14
- package/build/ox_modules/module-win/commands/getWindowHandles.js +15 -15
- package/build/ox_modules/module-win/commands/index.js +1 -1
- package/build/ox_modules/module-win/commands/isCheckable.js +14 -14
- package/build/ox_modules/module-win/commands/isChecked.js +14 -14
- package/build/ox_modules/module-win/commands/isClickable.js +14 -14
- package/build/ox_modules/module-win/commands/isExist.js +15 -15
- package/build/ox_modules/module-win/commands/isSelected.js +14 -14
- package/build/ox_modules/module-win/commands/isVisible.js +15 -15
- package/build/ox_modules/module-win/commands/open.js +13 -13
- package/build/ox_modules/module-win/commands/pause.js +12 -12
- package/build/ox_modules/module-win/commands/rightClick.js +13 -13
- package/build/ox_modules/module-win/commands/selectWindow.js +23 -23
- package/build/ox_modules/module-win/commands/sendKeys.js +22 -22
- package/build/ox_modules/module-win/commands/setTimeout.js +17 -17
- package/build/ox_modules/module-win/commands/takeScreenshot.js +16 -16
- package/build/ox_modules/module-win/commands/tap.js +13 -13
- package/build/ox_modules/module-win/commands/type.js +16 -16
- package/build/ox_modules/module-win/commands/waitForExist.js +14 -14
- package/build/ox_modules/module-win/commands/waitForInteractable.js +16 -16
- package/build/ox_modules/module-win/commands/waitForVisible.js +13 -13
- package/build/ox_modules/module-win.js +47 -47
- package/build/ox_modules/utils.js +8 -8
- package/build/ox_reporters/excel/template.json +48 -48
- package/build/ox_reporters/html/index.ejs +163 -163
- package/build/ox_reporters/html/summary.ejs +77 -77
- package/build/ox_reporters/html/tests-details.ejs +134 -134
- package/build/ox_reporters/html/tests-devices-browsers.ejs +83 -83
- package/build/ox_reporters/reporter-excel.js +1 -1
- package/build/ox_reporters/reporter-html.js +1 -1
- package/build/ox_reporters/reporter-json.js +1 -1
- package/build/ox_reporters/reporter-junit.js +1 -1
- package/build/ox_reporters/reporter-pdf.js +1 -1
- package/build/ox_reporters/reporter-rp.js +376 -0
- package/build/ox_reporters/reporter-xml.js +1 -1
- package/build/ox_services/service-devtools/submodule-network.js +1 -1
- package/build/ox_services/service-devtools.js +1 -1
- package/build/reporter/FileReporterBase.js +1 -1
- package/build/reporter/ReportAggregator.js +110 -43
- package/build/reporter/ReporterBase.js +2 -2
- package/build/runners/WorkerProcess.js +1 -1
- package/build/runners/cucumber/CucumberEventListener.js +1 -1
- package/build/runners/cucumber/CucumberReporter.js +1 -1
- package/build/runners/cucumber/CucumberWorker.js +1 -1
- package/build/runners/cucumber/index.js +1 -1
- package/build/runners/cucumber/worker.js +1 -1
- package/build/runners/index.js +1 -1
- package/build/runners/oxygen/OxygenWorker.js +1 -1
- package/build/runners/oxygen/index.js +37 -22
- package/build/runners/oxygen/worker.js +1 -1
- package/config/default.json +6 -6
- package/log.txt +1614 -0
- package/package.json +136 -135
- package/types/index.d.ts +70 -70
- package/types/module-eyes.d.ts +39 -39
- package/types/module-http.d.ts +163 -163
- package/types/module-log.d.ts +34 -34
- package/types/module-mob.d.ts +966 -966
- package/types/module-pdf.d.ts +40 -40
- package/types/module-proxy.d.ts +100 -100
- package/types/module-shell.d.ts +24 -24
- package/types/module-utils.d.ts +99 -99
- package/types/module-web.d.ts +1053 -1053
- package/types/module-win.d.ts +352 -352
- package/types/oxygen.d.ts +53 -53
package/types/module-win.d.ts
CHANGED
|
@@ -1,352 +1,352 @@
|
|
|
1
|
-
declare namespace Oxygen {
|
|
2
|
-
interface ModuleWin {
|
|
3
|
-
/**
|
|
4
|
-
* @function init
|
|
5
|
-
* @summary Initializes a new Appium session.
|
|
6
|
-
* @param {Object=} caps - Desired capabilities. If not specified capabilities will be taken from suite definition.
|
|
7
|
-
* @param {String=} appiumUrl - Remote Appium server URL (default: http://localhost:4723/wd/hub).
|
|
8
|
-
*/
|
|
9
|
-
init(caps?: Map<string, any>, appiumUrl?: string): void;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @function getDriver
|
|
13
|
-
* @summary Returns the underlying WDIO driver.
|
|
14
|
-
* @return {Object} WDIO driver.
|
|
15
|
-
*/
|
|
16
|
-
getDriver(): any;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @function getCapabilities
|
|
20
|
-
* @summary Returns currently defined capabilities.
|
|
21
|
-
* @return {Object} Current capabilities object.
|
|
22
|
-
*/
|
|
23
|
-
getCapabilities(): Map<string, any>;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* @summary Asserts element's inner text.
|
|
27
|
-
* @description Text pattern can be any of the supported
|
|
28
|
-
* string matching patterns(on the top of page).
|
|
29
|
-
* If the element is not interactable, then it will allways return empty string as its text.
|
|
30
|
-
* @function assertText
|
|
31
|
-
* @param {String|Element} locator - Element locator.
|
|
32
|
-
* @param {String} pattern - Assertion text or pattern.
|
|
33
|
-
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
34
|
-
*/
|
|
35
|
-
assertText(locator: string | Element, pattern: string, timeout?: number | undefined): void;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* @summary Asserts the page title.
|
|
39
|
-
* @description Assertion pattern can be any of the supported
|
|
40
|
-
* string matching patterns(on the top of page).
|
|
41
|
-
* @function assertTitle
|
|
42
|
-
* @param {String} pattern - Assertion text or pattern.
|
|
43
|
-
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
44
|
-
*/
|
|
45
|
-
assertTitle(pattern: string, timeout?: number | undefined): void;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @summary Asserts element's value.
|
|
49
|
-
* @function assertValue
|
|
50
|
-
* @param {String|Element} locator - Element locator.
|
|
51
|
-
* @param {String} pattern - Value pattern.
|
|
52
|
-
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
53
|
-
*/
|
|
54
|
-
assertValue(locator: string | Element, pattern: string, timeout?: number | undefined): void;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* @summary Navigate backwards in the browser history or simulates back button on Android device.
|
|
58
|
-
* @function back
|
|
59
|
-
*/
|
|
60
|
-
back(): void;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* @summary Clears element's value or content
|
|
64
|
-
* @function clear
|
|
65
|
-
* @param {String|Element} locator - Element locator.
|
|
66
|
-
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
67
|
-
*/
|
|
68
|
-
clear(locator: string | Element, timeout?: number | undefined): void;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* @summary Clicks on an element.
|
|
72
|
-
* @function click
|
|
73
|
-
* @param {String|Element} locator - Element locator.
|
|
74
|
-
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
75
|
-
*/
|
|
76
|
-
click(locator: string | Element, timeout?: number | undefined): void;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* @summary Performs a long click/touch on an element.
|
|
80
|
-
* @function clickLong
|
|
81
|
-
* @param {String|Element} locator - Element locator.
|
|
82
|
-
* @param {Number} duration - Touch duration in milliseconds.
|
|
83
|
-
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
84
|
-
*/
|
|
85
|
-
clickLong(locator: string | Element, duration: number, timeout?: number | undefined): void;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* @summary Performs tap on an element multiple times in quick succession.
|
|
89
|
-
* @function clickMultipleTimes
|
|
90
|
-
* @param {String|Element} locator - Element locator.
|
|
91
|
-
* @param {Number} taps - Number of taps.
|
|
92
|
-
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
93
|
-
*/
|
|
94
|
-
clickMultipleTimes(locator: string | Element, taps: number, timeout?: number | undefined): void;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* @summary Finds an element.
|
|
98
|
-
* @function findElement
|
|
99
|
-
* @param {String} locator - Element locator.
|
|
100
|
-
* @param {Element=} parent - Optional parent element for relative search.
|
|
101
|
-
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
102
|
-
* @return {Element} - A Element object.
|
|
103
|
-
*/
|
|
104
|
-
findElement(locator: string, parent?: Element | undefined, timeout?: number | undefined): Element;
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* @summary Finds elements.
|
|
108
|
-
* @function findElements
|
|
109
|
-
* @param {String} locator - Element locator.
|
|
110
|
-
* @param {Element=} parent - Optional parent element for relative search.
|
|
111
|
-
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
112
|
-
* @return {Element[]} - Collection of Element objects.
|
|
113
|
-
*/
|
|
114
|
-
findElements(locator: string, parent?: Element | undefined, timeout?: number | undefined): Element[];
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* @function getAppiumLogs
|
|
118
|
-
* @summary Collects logs from the Appium server.
|
|
119
|
-
* @return {Object[]} A list of logs.
|
|
120
|
-
*/
|
|
121
|
-
getAppiumLogs(): any[];
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* @summary Gets current window handle.
|
|
125
|
-
* @function getCurrentWindowHandle
|
|
126
|
-
* @return {String} A window handle.
|
|
127
|
-
* @example <caption>[javascript] Usage example</caption>
|
|
128
|
-
* win.init();
|
|
129
|
-
* win.getCurrentWindowHandle();
|
|
130
|
-
*/
|
|
131
|
-
getCurrentWindowHandle(): string;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* @summary Get element's location.
|
|
135
|
-
* @function getLocation
|
|
136
|
-
* @param {String|Element} locator - Element locator.
|
|
137
|
-
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
138
|
-
* @return {Object} - X and Y location of the element relative to top-left page corner.
|
|
139
|
-
*/
|
|
140
|
-
getLocation(locator: string | Element, timeout?: number | undefined): any;
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* @function getSource
|
|
144
|
-
* @summary Gets the source code of the page.
|
|
145
|
-
* @return {String} - HTML in case of web or hybrid application or XML in case of native.
|
|
146
|
-
*/
|
|
147
|
-
getSource(): string;
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* @summary Returns the text (rendered text shown to the user; whitespace-trimmed) of an element.
|
|
151
|
-
* @function getText
|
|
152
|
-
* @param {String|Element} locator - Element locator.
|
|
153
|
-
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
154
|
-
* @return {String} - Element's text.
|
|
155
|
-
*/
|
|
156
|
-
getText(locator: string | Element, timeout?: number | undefined): string;
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* @summary Gets element's value (whitespace-trimmed).
|
|
160
|
-
* @function getValue
|
|
161
|
-
* @param {String|Element} locator - Element locator.
|
|
162
|
-
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
163
|
-
* @return {String} - Element's value.
|
|
164
|
-
*/
|
|
165
|
-
getValue(locator: string | Element, timeout?: number | undefined): string;
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* @summary Gets handles of currently open windows.
|
|
169
|
-
* @function getWindowHandles
|
|
170
|
-
* @return {String[]} Array of all available window handles.
|
|
171
|
-
* @example <caption>[javascript] Usage example</caption>
|
|
172
|
-
* win.init();//Opens WinAppDriver session.
|
|
173
|
-
* win.getWindowHandles();//Gets the window handles of currently open application.
|
|
174
|
-
*/
|
|
175
|
-
getWindowHandles(): string[];
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* @summary Determines if checkbox or radio element is checkable.
|
|
179
|
-
* @function isCheckable
|
|
180
|
-
* @param {String|Element} locator - Element locator.
|
|
181
|
-
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
182
|
-
* @return {Boolean} - true if element is checkable. false otherwise.
|
|
183
|
-
*/
|
|
184
|
-
isCheckable(locator: string | Element, timeout?: number | undefined): boolean;
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* @summary Determines if checkbox or radio element is checked.
|
|
188
|
-
* @function isChecked
|
|
189
|
-
* @param {String|Element} locator - Element locator.
|
|
190
|
-
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
191
|
-
* @return {Boolean} - true if element is checked. false otherwise.
|
|
192
|
-
*/
|
|
193
|
-
isChecked(locator: string | Element, timeout?: number | undefined): boolean;
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* @summary Determines if an element is clickable.
|
|
197
|
-
* @function isClickable
|
|
198
|
-
* @param {String|Element} locator - Element locator.
|
|
199
|
-
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
200
|
-
* @return {Boolean} - true if element is clickable. false otherwise.
|
|
201
|
-
*/
|
|
202
|
-
isClickable(locator: string | Element, timeout?: number | undefined): boolean;
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* @summary Wait for an element to become available.
|
|
206
|
-
* @description The element is not necessary needs to be visible.
|
|
207
|
-
* @function isExist
|
|
208
|
-
* @param {String|Element} locator - Element locator.
|
|
209
|
-
* @param {Number=} timeout - Time in milliseconds to wait for the element. Default is 60 seconds.
|
|
210
|
-
* @return {Boolean} - true if the element exists. false otherwise.
|
|
211
|
-
*/
|
|
212
|
-
isExist(locator: string | Element, timeout?: number | undefined): boolean;
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* @summary Determines if an element is selected.
|
|
216
|
-
* @function isSelected
|
|
217
|
-
* @param {String|Element} locator - Element locator.
|
|
218
|
-
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
219
|
-
* @return {Boolean} - true if element is selected. false otherwise.
|
|
220
|
-
*/
|
|
221
|
-
isSelected(locator: string | Element, timeout?: number | undefined): boolean;
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* @summary Checks if element is present and visible. Returns false if element was not found or
|
|
225
|
-
* wasn't visible within the specified timeout.
|
|
226
|
-
* @function isVisible
|
|
227
|
-
* @param {String|Element} locator - An element locator.
|
|
228
|
-
* @param {Number=} timeout - Timeout in milliseconds to wait for element to appear. Default is 60 seconds.
|
|
229
|
-
* @return {Boolean} True if element was found and it was visible. False otherwise.
|
|
230
|
-
*/
|
|
231
|
-
isVisible(locator: string | Element, timeout?: number | undefined): boolean;
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* @summary Opens an URL.
|
|
235
|
-
* @description The `open` command waits for the page to load before proceeding.
|
|
236
|
-
* @function open
|
|
237
|
-
* @param {String} url - The URL to open; may be relative or absolute.
|
|
238
|
-
*/
|
|
239
|
-
open(url: string): void;
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* @summary Pause test execution for the given amount of milliseconds.
|
|
243
|
-
* @function pause
|
|
244
|
-
* @param {Number} ms - Milliseconds to pause the execution for.
|
|
245
|
-
*/
|
|
246
|
-
pause(ms: number): void;
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* @summary Perform right click on an element.
|
|
250
|
-
* @function rightClick
|
|
251
|
-
* @param {String|Element} locator - An element locator.
|
|
252
|
-
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
253
|
-
*/
|
|
254
|
-
rightClick(locator: string | Element, timeout?: number | undefined): void;
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* @summary Selects window. Once window has been selected, all commands go to that window.
|
|
258
|
-
* @description `windowLocator` can be:
|
|
259
|
-
* - `title=TITLE` Switch to the first window which matches the specified title. `TITLE` can be any of
|
|
260
|
-
* the supported string matching patterns (see top of the page). When using title locator, this command
|
|
261
|
-
* will wait for the window to appear first similarly to `waitForWindow` command.
|
|
262
|
-
* - `windowHandle` Switch to a window using its unique handle.
|
|
263
|
-
* @function selectWindow
|
|
264
|
-
* @param {String=} windowLocator - Window locator.
|
|
265
|
-
* @param {Number=} timeout - Timeout in milliseconds when using 'title' window locating strategy.
|
|
266
|
-
* Default is 60 seconds.
|
|
267
|
-
* @return {String} windowHandle of the previously selected window.
|
|
268
|
-
* @example <caption>[javascript] Usage example</caption>
|
|
269
|
-
* win.init();
|
|
270
|
-
* win.selectWindow("title=FolderName");// Selects and focus a window.
|
|
271
|
-
*/
|
|
272
|
-
selectWindow(windowHandle: any, timeout?: number | undefined): string;
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* @summary Send a sequence of keyboard strokes to the active window or element.
|
|
276
|
-
* @description Refer to [Key Codes](https://w3c.github.io/webdriver/#keyboard-actions)
|
|
277
|
-
* for the list of supported raw keyboard key codes.
|
|
278
|
-
* @function sendKeys
|
|
279
|
-
* @param {(String|String[])} value - Sequence of key strokes to send. Can be either a string or an
|
|
280
|
-
* array of strings for sending raw key codes.
|
|
281
|
-
* @example <caption>[javascript] Usage example</caption>
|
|
282
|
-
* win.init();//Opens browser session.
|
|
283
|
-
* win.open("www.yourwebsite.com");// Opens a website.
|
|
284
|
-
* win.sendKeys("Hello World");
|
|
285
|
-
* win.sendKeys(["Backspace", "Backspace", "Enter"]); // send two Backspace key codes and Enter.
|
|
286
|
-
* // Unicode representation can be used directly as well:
|
|
287
|
-
* win.sendKeys("Hello World\uE003\uE003\uE007");
|
|
288
|
-
*/
|
|
289
|
-
sendKeys(value: (string | string[])): void;
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* @summary Specifies the amount of time that Oxygen will wait for actions to complete.
|
|
293
|
-
* @description This includes the `open` command, `waitFor*` commands, and commands which wait
|
|
294
|
-
* for elements to appear in DOM or become visible before operating on them.
|
|
295
|
-
* If command wasn't able to complete within the specified period it will fail the
|
|
296
|
-
* test.
|
|
297
|
-
* The default time-out is 60 seconds.
|
|
298
|
-
* @function setTimeout
|
|
299
|
-
* @param {Number} timeout - A time-out in milliseconds.
|
|
300
|
-
*/
|
|
301
|
-
setTimeout(timeout: number): void;
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* @function takeScreenshot
|
|
305
|
-
* @summary Take a screenshot of the current page or screen and return it as base64 encoded string.
|
|
306
|
-
* @return {String} Screenshot image encoded as a base64 string.
|
|
307
|
-
* @example <caption>[javascript] Usage example</caption>
|
|
308
|
-
* win.init(caps);
|
|
309
|
-
* var ss = win.takeScreenshot();//Take a screenshot and return it as base64 encoded string.
|
|
310
|
-
* require("fs").writeFileSync("c:\\screenshot.png", ss, 'base64');
|
|
311
|
-
*/
|
|
312
|
-
takeScreenshot(): string;
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* @summary Perform tap at the specified coordinate.
|
|
316
|
-
* @function tap
|
|
317
|
-
* @param {Number} x - x offset.
|
|
318
|
-
* @param {Number} y - y offset.
|
|
319
|
-
*/
|
|
320
|
-
tap(x: number, y: number): void;
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* @summary Send a sequence of key strokes to an element (clears value before).
|
|
324
|
-
* @description Refer to [Key Codes](https://w3c.github.io/webdriver/#keyboard-actions)
|
|
325
|
-
* for the list of supported raw keyboard key codes.
|
|
326
|
-
* @function type
|
|
327
|
-
* @param {String|Element} locator - An element locator.
|
|
328
|
-
* @param {String} value - The value to type.
|
|
329
|
-
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
330
|
-
*/
|
|
331
|
-
type(locator: string | Element, value: string, timeout?: number | undefined): void;
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* @summary Wait for an element for the provided amount of milliseconds to exist in DOM.
|
|
335
|
-
* @description The element is not necessary needs to be visible.
|
|
336
|
-
* @function waitForExist
|
|
337
|
-
* @param {String|Element} locator - Element locator.
|
|
338
|
-
* @param {Number=} timeout - Time in milliseconds to wait for the element. Default is 60 seconds.
|
|
339
|
-
*/
|
|
340
|
-
waitForExist(locator: string | Element, timeout?: number | undefined): void;
|
|
341
|
-
|
|
342
|
-
waitForInteractable(locator: any, timeout: any): void;
|
|
343
|
-
|
|
344
|
-
/**
|
|
345
|
-
* @summary Waits for element to become visible.
|
|
346
|
-
* @function waitForVisible
|
|
347
|
-
* @param {String|Element} locator - Element locator.
|
|
348
|
-
* @param {Number=} timeout - Time in milliseconds to wait for the element. Default is 60 seconds.
|
|
349
|
-
*/
|
|
350
|
-
waitForVisible(locator: string | Element, timeout?: number | undefined): void;
|
|
351
|
-
}
|
|
352
|
-
}
|
|
1
|
+
declare namespace Oxygen {
|
|
2
|
+
interface ModuleWin {
|
|
3
|
+
/**
|
|
4
|
+
* @function init
|
|
5
|
+
* @summary Initializes a new Appium session.
|
|
6
|
+
* @param {Object=} caps - Desired capabilities. If not specified capabilities will be taken from suite definition.
|
|
7
|
+
* @param {String=} appiumUrl - Remote Appium server URL (default: http://localhost:4723/wd/hub).
|
|
8
|
+
*/
|
|
9
|
+
init(caps?: Map<string, any>, appiumUrl?: string): void;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @function getDriver
|
|
13
|
+
* @summary Returns the underlying WDIO driver.
|
|
14
|
+
* @return {Object} WDIO driver.
|
|
15
|
+
*/
|
|
16
|
+
getDriver(): any;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @function getCapabilities
|
|
20
|
+
* @summary Returns currently defined capabilities.
|
|
21
|
+
* @return {Object} Current capabilities object.
|
|
22
|
+
*/
|
|
23
|
+
getCapabilities(): Map<string, any>;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @summary Asserts element's inner text.
|
|
27
|
+
* @description Text pattern can be any of the supported
|
|
28
|
+
* string matching patterns(on the top of page).
|
|
29
|
+
* If the element is not interactable, then it will allways return empty string as its text.
|
|
30
|
+
* @function assertText
|
|
31
|
+
* @param {String|Element} locator - Element locator.
|
|
32
|
+
* @param {String} pattern - Assertion text or pattern.
|
|
33
|
+
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
34
|
+
*/
|
|
35
|
+
assertText(locator: string | Element, pattern: string, timeout?: number | undefined): void;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @summary Asserts the page title.
|
|
39
|
+
* @description Assertion pattern can be any of the supported
|
|
40
|
+
* string matching patterns(on the top of page).
|
|
41
|
+
* @function assertTitle
|
|
42
|
+
* @param {String} pattern - Assertion text or pattern.
|
|
43
|
+
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
44
|
+
*/
|
|
45
|
+
assertTitle(pattern: string, timeout?: number | undefined): void;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @summary Asserts element's value.
|
|
49
|
+
* @function assertValue
|
|
50
|
+
* @param {String|Element} locator - Element locator.
|
|
51
|
+
* @param {String} pattern - Value pattern.
|
|
52
|
+
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
53
|
+
*/
|
|
54
|
+
assertValue(locator: string | Element, pattern: string, timeout?: number | undefined): void;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @summary Navigate backwards in the browser history or simulates back button on Android device.
|
|
58
|
+
* @function back
|
|
59
|
+
*/
|
|
60
|
+
back(): void;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @summary Clears element's value or content
|
|
64
|
+
* @function clear
|
|
65
|
+
* @param {String|Element} locator - Element locator.
|
|
66
|
+
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
67
|
+
*/
|
|
68
|
+
clear(locator: string | Element, timeout?: number | undefined): void;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @summary Clicks on an element.
|
|
72
|
+
* @function click
|
|
73
|
+
* @param {String|Element} locator - Element locator.
|
|
74
|
+
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
75
|
+
*/
|
|
76
|
+
click(locator: string | Element, timeout?: number | undefined): void;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* @summary Performs a long click/touch on an element.
|
|
80
|
+
* @function clickLong
|
|
81
|
+
* @param {String|Element} locator - Element locator.
|
|
82
|
+
* @param {Number} duration - Touch duration in milliseconds.
|
|
83
|
+
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
84
|
+
*/
|
|
85
|
+
clickLong(locator: string | Element, duration: number, timeout?: number | undefined): void;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @summary Performs tap on an element multiple times in quick succession.
|
|
89
|
+
* @function clickMultipleTimes
|
|
90
|
+
* @param {String|Element} locator - Element locator.
|
|
91
|
+
* @param {Number} taps - Number of taps.
|
|
92
|
+
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
93
|
+
*/
|
|
94
|
+
clickMultipleTimes(locator: string | Element, taps: number, timeout?: number | undefined): void;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @summary Finds an element.
|
|
98
|
+
* @function findElement
|
|
99
|
+
* @param {String} locator - Element locator.
|
|
100
|
+
* @param {Element=} parent - Optional parent element for relative search.
|
|
101
|
+
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
102
|
+
* @return {Element} - A Element object.
|
|
103
|
+
*/
|
|
104
|
+
findElement(locator: string, parent?: Element | undefined, timeout?: number | undefined): Element;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @summary Finds elements.
|
|
108
|
+
* @function findElements
|
|
109
|
+
* @param {String} locator - Element locator.
|
|
110
|
+
* @param {Element=} parent - Optional parent element for relative search.
|
|
111
|
+
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
112
|
+
* @return {Element[]} - Collection of Element objects.
|
|
113
|
+
*/
|
|
114
|
+
findElements(locator: string, parent?: Element | undefined, timeout?: number | undefined): Element[];
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @function getAppiumLogs
|
|
118
|
+
* @summary Collects logs from the Appium server.
|
|
119
|
+
* @return {Object[]} A list of logs.
|
|
120
|
+
*/
|
|
121
|
+
getAppiumLogs(): any[];
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* @summary Gets current window handle.
|
|
125
|
+
* @function getCurrentWindowHandle
|
|
126
|
+
* @return {String} A window handle.
|
|
127
|
+
* @example <caption>[javascript] Usage example</caption>
|
|
128
|
+
* win.init();
|
|
129
|
+
* win.getCurrentWindowHandle();
|
|
130
|
+
*/
|
|
131
|
+
getCurrentWindowHandle(): string;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @summary Get element's location.
|
|
135
|
+
* @function getLocation
|
|
136
|
+
* @param {String|Element} locator - Element locator.
|
|
137
|
+
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
138
|
+
* @return {Object} - X and Y location of the element relative to top-left page corner.
|
|
139
|
+
*/
|
|
140
|
+
getLocation(locator: string | Element, timeout?: number | undefined): any;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* @function getSource
|
|
144
|
+
* @summary Gets the source code of the page.
|
|
145
|
+
* @return {String} - HTML in case of web or hybrid application or XML in case of native.
|
|
146
|
+
*/
|
|
147
|
+
getSource(): string;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* @summary Returns the text (rendered text shown to the user; whitespace-trimmed) of an element.
|
|
151
|
+
* @function getText
|
|
152
|
+
* @param {String|Element} locator - Element locator.
|
|
153
|
+
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
154
|
+
* @return {String} - Element's text.
|
|
155
|
+
*/
|
|
156
|
+
getText(locator: string | Element, timeout?: number | undefined): string;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* @summary Gets element's value (whitespace-trimmed).
|
|
160
|
+
* @function getValue
|
|
161
|
+
* @param {String|Element} locator - Element locator.
|
|
162
|
+
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
163
|
+
* @return {String} - Element's value.
|
|
164
|
+
*/
|
|
165
|
+
getValue(locator: string | Element, timeout?: number | undefined): string;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* @summary Gets handles of currently open windows.
|
|
169
|
+
* @function getWindowHandles
|
|
170
|
+
* @return {String[]} Array of all available window handles.
|
|
171
|
+
* @example <caption>[javascript] Usage example</caption>
|
|
172
|
+
* win.init();//Opens WinAppDriver session.
|
|
173
|
+
* win.getWindowHandles();//Gets the window handles of currently open application.
|
|
174
|
+
*/
|
|
175
|
+
getWindowHandles(): string[];
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* @summary Determines if checkbox or radio element is checkable.
|
|
179
|
+
* @function isCheckable
|
|
180
|
+
* @param {String|Element} locator - Element locator.
|
|
181
|
+
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
182
|
+
* @return {Boolean} - true if element is checkable. false otherwise.
|
|
183
|
+
*/
|
|
184
|
+
isCheckable(locator: string | Element, timeout?: number | undefined): boolean;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* @summary Determines if checkbox or radio element is checked.
|
|
188
|
+
* @function isChecked
|
|
189
|
+
* @param {String|Element} locator - Element locator.
|
|
190
|
+
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
191
|
+
* @return {Boolean} - true if element is checked. false otherwise.
|
|
192
|
+
*/
|
|
193
|
+
isChecked(locator: string | Element, timeout?: number | undefined): boolean;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* @summary Determines if an element is clickable.
|
|
197
|
+
* @function isClickable
|
|
198
|
+
* @param {String|Element} locator - Element locator.
|
|
199
|
+
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
200
|
+
* @return {Boolean} - true if element is clickable. false otherwise.
|
|
201
|
+
*/
|
|
202
|
+
isClickable(locator: string | Element, timeout?: number | undefined): boolean;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* @summary Wait for an element to become available.
|
|
206
|
+
* @description The element is not necessary needs to be visible.
|
|
207
|
+
* @function isExist
|
|
208
|
+
* @param {String|Element} locator - Element locator.
|
|
209
|
+
* @param {Number=} timeout - Time in milliseconds to wait for the element. Default is 60 seconds.
|
|
210
|
+
* @return {Boolean} - true if the element exists. false otherwise.
|
|
211
|
+
*/
|
|
212
|
+
isExist(locator: string | Element, timeout?: number | undefined): boolean;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* @summary Determines if an element is selected.
|
|
216
|
+
* @function isSelected
|
|
217
|
+
* @param {String|Element} locator - Element locator.
|
|
218
|
+
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
219
|
+
* @return {Boolean} - true if element is selected. false otherwise.
|
|
220
|
+
*/
|
|
221
|
+
isSelected(locator: string | Element, timeout?: number | undefined): boolean;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* @summary Checks if element is present and visible. Returns false if element was not found or
|
|
225
|
+
* wasn't visible within the specified timeout.
|
|
226
|
+
* @function isVisible
|
|
227
|
+
* @param {String|Element} locator - An element locator.
|
|
228
|
+
* @param {Number=} timeout - Timeout in milliseconds to wait for element to appear. Default is 60 seconds.
|
|
229
|
+
* @return {Boolean} True if element was found and it was visible. False otherwise.
|
|
230
|
+
*/
|
|
231
|
+
isVisible(locator: string | Element, timeout?: number | undefined): boolean;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* @summary Opens an URL.
|
|
235
|
+
* @description The `open` command waits for the page to load before proceeding.
|
|
236
|
+
* @function open
|
|
237
|
+
* @param {String} url - The URL to open; may be relative or absolute.
|
|
238
|
+
*/
|
|
239
|
+
open(url: string): void;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* @summary Pause test execution for the given amount of milliseconds.
|
|
243
|
+
* @function pause
|
|
244
|
+
* @param {Number} ms - Milliseconds to pause the execution for.
|
|
245
|
+
*/
|
|
246
|
+
pause(ms: number): void;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* @summary Perform right click on an element.
|
|
250
|
+
* @function rightClick
|
|
251
|
+
* @param {String|Element} locator - An element locator.
|
|
252
|
+
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
253
|
+
*/
|
|
254
|
+
rightClick(locator: string | Element, timeout?: number | undefined): void;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* @summary Selects window. Once window has been selected, all commands go to that window.
|
|
258
|
+
* @description `windowLocator` can be:
|
|
259
|
+
* - `title=TITLE` Switch to the first window which matches the specified title. `TITLE` can be any of
|
|
260
|
+
* the supported string matching patterns (see top of the page). When using title locator, this command
|
|
261
|
+
* will wait for the window to appear first similarly to `waitForWindow` command.
|
|
262
|
+
* - `windowHandle` Switch to a window using its unique handle.
|
|
263
|
+
* @function selectWindow
|
|
264
|
+
* @param {String=} windowLocator - Window locator.
|
|
265
|
+
* @param {Number=} timeout - Timeout in milliseconds when using 'title' window locating strategy.
|
|
266
|
+
* Default is 60 seconds.
|
|
267
|
+
* @return {String} windowHandle of the previously selected window.
|
|
268
|
+
* @example <caption>[javascript] Usage example</caption>
|
|
269
|
+
* win.init();
|
|
270
|
+
* win.selectWindow("title=FolderName");// Selects and focus a window.
|
|
271
|
+
*/
|
|
272
|
+
selectWindow(windowHandle: any, timeout?: number | undefined): string;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* @summary Send a sequence of keyboard strokes to the active window or element.
|
|
276
|
+
* @description Refer to [Key Codes](https://w3c.github.io/webdriver/#keyboard-actions)
|
|
277
|
+
* for the list of supported raw keyboard key codes.
|
|
278
|
+
* @function sendKeys
|
|
279
|
+
* @param {(String|String[])} value - Sequence of key strokes to send. Can be either a string or an
|
|
280
|
+
* array of strings for sending raw key codes.
|
|
281
|
+
* @example <caption>[javascript] Usage example</caption>
|
|
282
|
+
* win.init();//Opens browser session.
|
|
283
|
+
* win.open("www.yourwebsite.com");// Opens a website.
|
|
284
|
+
* win.sendKeys("Hello World");
|
|
285
|
+
* win.sendKeys(["Backspace", "Backspace", "Enter"]); // send two Backspace key codes and Enter.
|
|
286
|
+
* // Unicode representation can be used directly as well:
|
|
287
|
+
* win.sendKeys("Hello World\uE003\uE003\uE007");
|
|
288
|
+
*/
|
|
289
|
+
sendKeys(value: (string | string[])): void;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* @summary Specifies the amount of time that Oxygen will wait for actions to complete.
|
|
293
|
+
* @description This includes the `open` command, `waitFor*` commands, and commands which wait
|
|
294
|
+
* for elements to appear in DOM or become visible before operating on them.
|
|
295
|
+
* If command wasn't able to complete within the specified period it will fail the
|
|
296
|
+
* test.
|
|
297
|
+
* The default time-out is 60 seconds.
|
|
298
|
+
* @function setTimeout
|
|
299
|
+
* @param {Number} timeout - A time-out in milliseconds.
|
|
300
|
+
*/
|
|
301
|
+
setTimeout(timeout: number): void;
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* @function takeScreenshot
|
|
305
|
+
* @summary Take a screenshot of the current page or screen and return it as base64 encoded string.
|
|
306
|
+
* @return {String} Screenshot image encoded as a base64 string.
|
|
307
|
+
* @example <caption>[javascript] Usage example</caption>
|
|
308
|
+
* win.init(caps);
|
|
309
|
+
* var ss = win.takeScreenshot();//Take a screenshot and return it as base64 encoded string.
|
|
310
|
+
* require("fs").writeFileSync("c:\\screenshot.png", ss, 'base64');
|
|
311
|
+
*/
|
|
312
|
+
takeScreenshot(): string;
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* @summary Perform tap at the specified coordinate.
|
|
316
|
+
* @function tap
|
|
317
|
+
* @param {Number} x - x offset.
|
|
318
|
+
* @param {Number} y - y offset.
|
|
319
|
+
*/
|
|
320
|
+
tap(x: number, y: number): void;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* @summary Send a sequence of key strokes to an element (clears value before).
|
|
324
|
+
* @description Refer to [Key Codes](https://w3c.github.io/webdriver/#keyboard-actions)
|
|
325
|
+
* for the list of supported raw keyboard key codes.
|
|
326
|
+
* @function type
|
|
327
|
+
* @param {String|Element} locator - An element locator.
|
|
328
|
+
* @param {String} value - The value to type.
|
|
329
|
+
* @param {Number=} timeout - Timeout in milliseconds. Default is 60 seconds.
|
|
330
|
+
*/
|
|
331
|
+
type(locator: string | Element, value: string, timeout?: number | undefined): void;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* @summary Wait for an element for the provided amount of milliseconds to exist in DOM.
|
|
335
|
+
* @description The element is not necessary needs to be visible.
|
|
336
|
+
* @function waitForExist
|
|
337
|
+
* @param {String|Element} locator - Element locator.
|
|
338
|
+
* @param {Number=} timeout - Time in milliseconds to wait for the element. Default is 60 seconds.
|
|
339
|
+
*/
|
|
340
|
+
waitForExist(locator: string | Element, timeout?: number | undefined): void;
|
|
341
|
+
|
|
342
|
+
waitForInteractable(locator: any, timeout: any): void;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* @summary Waits for element to become visible.
|
|
346
|
+
* @function waitForVisible
|
|
347
|
+
* @param {String|Element} locator - Element locator.
|
|
348
|
+
* @param {Number=} timeout - Time in milliseconds to wait for the element. Default is 60 seconds.
|
|
349
|
+
*/
|
|
350
|
+
waitForVisible(locator: string | Element, timeout?: number | undefined): void;
|
|
351
|
+
}
|
|
352
|
+
}
|