webdriverio 7.16.16 → 7.17.0
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/package.json +7 -7
- package/build/commands/browser/$$.d.ts +0 -50
- package/build/commands/browser/$$.d.ts.map +0 -1
- package/build/commands/browser/$$.js +0 -57
- package/build/commands/browser/$.d.ts +0 -77
- package/build/commands/browser/$.d.ts.map +0 -1
- package/build/commands/browser/$.js +0 -91
- package/build/commands/browser/addCommand.d.ts +0 -37
- package/build/commands/browser/addCommand.d.ts.map +0 -1
- package/build/commands/browser/addCommand.js +0 -37
- package/build/commands/browser/call.d.ts +0 -42
- package/build/commands/browser/call.d.ts.map +0 -1
- package/build/commands/browser/call.js +0 -49
- package/build/commands/browser/custom$$.d.ts +0 -26
- package/build/commands/browser/custom$$.d.ts.map +0 -1
- package/build/commands/browser/custom$$.js +0 -47
- package/build/commands/browser/custom$.d.ts +0 -25
- package/build/commands/browser/custom$.d.ts.map +0 -1
- package/build/commands/browser/custom$.js +0 -47
- package/build/commands/browser/debug.d.ts +0 -32
- package/build/commands/browser/debug.d.ts.map +0 -1
- package/build/commands/browser/debug.js +0 -108
- package/build/commands/browser/deleteCookies.d.ts +0 -45
- package/build/commands/browser/deleteCookies.d.ts.map +0 -1
- package/build/commands/browser/deleteCookies.js +0 -56
- package/build/commands/browser/execute.d.ts +0 -37
- package/build/commands/browser/execute.d.ts.map +0 -1
- package/build/commands/browser/execute.js +0 -55
- package/build/commands/browser/executeAsync.d.ts +0 -45
- package/build/commands/browser/executeAsync.d.ts.map +0 -1
- package/build/commands/browser/executeAsync.js +0 -63
- package/build/commands/browser/getCookies.d.ts +0 -34
- package/build/commands/browser/getCookies.d.ts.map +0 -1
- package/build/commands/browser/getCookies.js +0 -46
- package/build/commands/browser/getPuppeteer.d.ts +0 -38
- package/build/commands/browser/getPuppeteer.d.ts.map +0 -1
- package/build/commands/browser/getPuppeteer.js +0 -119
- package/build/commands/browser/getWindowSize.d.ts +0 -25
- package/build/commands/browser/getWindowSize.d.ts.map +0 -1
- package/build/commands/browser/getWindowSize.js +0 -30
- package/build/commands/browser/keys.d.ts +0 -28
- package/build/commands/browser/keys.d.ts.map +0 -1
- package/build/commands/browser/keys.js +0 -64
- package/build/commands/browser/mock.d.ts +0 -111
- package/build/commands/browser/mock.d.ts.map +0 -1
- package/build/commands/browser/mock.js +0 -164
- package/build/commands/browser/mockClearAll.d.ts +0 -28
- package/build/commands/browser/mockClearAll.d.ts.map +0 -1
- package/build/commands/browser/mockClearAll.js +0 -43
- package/build/commands/browser/mockRestoreAll.d.ts +0 -26
- package/build/commands/browser/mockRestoreAll.d.ts.map +0 -1
- package/build/commands/browser/mockRestoreAll.js +0 -41
- package/build/commands/browser/newWindow.d.ts +0 -41
- package/build/commands/browser/newWindow.d.ts.map +0 -1
- package/build/commands/browser/newWindow.js +0 -83
- package/build/commands/browser/overwriteCommand.d.ts +0 -32
- package/build/commands/browser/overwriteCommand.d.ts.map +0 -1
- package/build/commands/browser/overwriteCommand.js +0 -32
- package/build/commands/browser/pause.d.ts +0 -23
- package/build/commands/browser/pause.d.ts.map +0 -1
- package/build/commands/browser/pause.js +0 -27
- package/build/commands/browser/react$$.d.ts +0 -36
- package/build/commands/browser/react$$.d.ts.map +0 -1
- package/build/commands/browser/react$$.js +0 -51
- package/build/commands/browser/react$.d.ts +0 -46
- package/build/commands/browser/react$.d.ts.map +0 -1
- package/build/commands/browser/react$.js +0 -59
- package/build/commands/browser/reloadSession.d.ts +0 -23
- package/build/commands/browser/reloadSession.d.ts.map +0 -1
- package/build/commands/browser/reloadSession.js +0 -58
- package/build/commands/browser/savePDF.d.ts +0 -46
- package/build/commands/browser/savePDF.d.ts.map +0 -1
- package/build/commands/browser/savePDF.js +0 -51
- package/build/commands/browser/saveRecordingScreen.d.ts +0 -28
- package/build/commands/browser/saveRecordingScreen.d.ts.map +0 -1
- package/build/commands/browser/saveRecordingScreen.js +0 -47
- package/build/commands/browser/saveScreenshot.d.ts +0 -22
- package/build/commands/browser/saveScreenshot.d.ts.map +0 -1
- package/build/commands/browser/saveScreenshot.js +0 -41
- package/build/commands/browser/setCookies.d.ts +0 -57
- package/build/commands/browser/setCookies.d.ts.map +0 -1
- package/build/commands/browser/setCookies.js +0 -66
- package/build/commands/browser/setTimeout.d.ts +0 -31
- package/build/commands/browser/setTimeout.d.ts.map +0 -1
- package/build/commands/browser/setTimeout.js +0 -61
- package/build/commands/browser/setWindowSize.d.ts +0 -20
- package/build/commands/browser/setWindowSize.d.ts.map +0 -1
- package/build/commands/browser/setWindowSize.js +0 -43
- package/build/commands/browser/switchWindow.d.ts +0 -30
- package/build/commands/browser/switchWindow.d.ts.map +0 -1
- package/build/commands/browser/switchWindow.js +0 -73
- package/build/commands/browser/throttle.d.ts +0 -3
- package/build/commands/browser/throttle.d.ts.map +0 -1
- package/build/commands/browser/throttle.js +0 -144
- package/build/commands/browser/touchAction.d.ts +0 -61
- package/build/commands/browser/touchAction.d.ts.map +0 -1
- package/build/commands/browser/touchAction.js +0 -65
- package/build/commands/browser/uploadFile.d.ts +0 -32
- package/build/commands/browser/uploadFile.d.ts.map +0 -1
- package/build/commands/browser/uploadFile.js +0 -63
- package/build/commands/browser/url.d.ts +0 -38
- package/build/commands/browser/url.d.ts.map +0 -1
- package/build/commands/browser/url.js +0 -49
- package/build/commands/browser/waitUntil.d.ts +0 -44
- package/build/commands/browser/waitUntil.d.ts.map +0 -1
- package/build/commands/browser/waitUntil.js +0 -73
- package/build/commands/browser.d.ts +0 -70
- package/build/commands/browser.d.ts.map +0 -1
- package/build/commands/browser.js +0 -44
- package/build/commands/constant.d.ts +0 -19
- package/build/commands/constant.d.ts.map +0 -1
- package/build/commands/constant.js +0 -91
- package/build/commands/element/$$.d.ts +0 -46
- package/build/commands/element/$$.d.ts.map +0 -1
- package/build/commands/element/$$.js +0 -50
- package/build/commands/element/$.d.ts +0 -72
- package/build/commands/element/$.d.ts.map +0 -1
- package/build/commands/element/$.js +0 -76
- package/build/commands/element/addValue.d.ts +0 -33
- package/build/commands/element/addValue.d.ts.map +0 -1
- package/build/commands/element/addValue.js +0 -48
- package/build/commands/element/clearValue.d.ts +0 -28
- package/build/commands/element/clearValue.d.ts.map +0 -1
- package/build/commands/element/clearValue.js +0 -32
- package/build/commands/element/click.d.ts +0 -73
- package/build/commands/element/click.d.ts.map +0 -1
- package/build/commands/element/click.js +0 -134
- package/build/commands/element/custom$$.d.ts +0 -28
- package/build/commands/element/custom$$.d.ts.map +0 -1
- package/build/commands/element/custom$$.js +0 -57
- package/build/commands/element/custom$.d.ts +0 -27
- package/build/commands/element/custom$.d.ts.map +0 -1
- package/build/commands/element/custom$.js +0 -57
- package/build/commands/element/doubleClick.d.ts +0 -25
- package/build/commands/element/doubleClick.d.ts.map +0 -1
- package/build/commands/element/doubleClick.js +0 -51
- package/build/commands/element/dragAndDrop.d.ts +0 -41
- package/build/commands/element/dragAndDrop.d.ts.map +0 -1
- package/build/commands/element/dragAndDrop.js +0 -98
- package/build/commands/element/getAttribute.d.ts +0 -28
- package/build/commands/element/getAttribute.d.ts.map +0 -1
- package/build/commands/element/getAttribute.js +0 -32
- package/build/commands/element/getCSSProperty.d.ts +0 -71
- package/build/commands/element/getCSSProperty.d.ts.map +0 -1
- package/build/commands/element/getCSSProperty.js +0 -108
- package/build/commands/element/getComputedLabel.d.ts +0 -20
- package/build/commands/element/getComputedLabel.d.ts.map +0 -1
- package/build/commands/element/getComputedLabel.js +0 -24
- package/build/commands/element/getComputedRole.d.ts +0 -20
- package/build/commands/element/getComputedRole.d.ts.map +0 -1
- package/build/commands/element/getComputedRole.js +0 -24
- package/build/commands/element/getHTML.d.ts +0 -32
- package/build/commands/element/getHTML.d.ts.map +0 -1
- package/build/commands/element/getHTML.js +0 -46
- package/build/commands/element/getLocation.d.ts +0 -6
- package/build/commands/element/getLocation.d.ts.map +0 -1
- package/build/commands/element/getLocation.js +0 -46
- package/build/commands/element/getProperty.d.ts +0 -53
- package/build/commands/element/getProperty.d.ts.map +0 -1
- package/build/commands/element/getProperty.js +0 -31
- package/build/commands/element/getSize.d.ts +0 -6
- package/build/commands/element/getSize.d.ts.map +0 -1
- package/build/commands/element/getSize.js +0 -47
- package/build/commands/element/getTagName.d.ts +0 -25
- package/build/commands/element/getTagName.d.ts.map +0 -1
- package/build/commands/element/getTagName.js +0 -29
- package/build/commands/element/getText.d.ts +0 -42
- package/build/commands/element/getText.d.ts.map +0 -1
- package/build/commands/element/getText.js +0 -46
- package/build/commands/element/getValue.d.ts +0 -25
- package/build/commands/element/getValue.d.ts.map +0 -1
- package/build/commands/element/getValue.js +0 -33
- package/build/commands/element/isClickable.d.ts +0 -40
- package/build/commands/element/isClickable.d.ts.map +0 -1
- package/build/commands/element/isClickable.js +0 -57
- package/build/commands/element/isDisplayed.d.ts +0 -50
- package/build/commands/element/isDisplayed.d.ts.map +0 -1
- package/build/commands/element/isDisplayed.js +0 -85
- package/build/commands/element/isDisplayedInViewport.d.ts +0 -38
- package/build/commands/element/isDisplayedInViewport.d.ts.map +0 -1
- package/build/commands/element/isDisplayedInViewport.js +0 -55
- package/build/commands/element/isEnabled.d.ts +0 -34
- package/build/commands/element/isEnabled.d.ts.map +0 -1
- package/build/commands/element/isEnabled.js +0 -38
- package/build/commands/element/isEqual.d.ts +0 -24
- package/build/commands/element/isEqual.d.ts.map +0 -1
- package/build/commands/element/isEqual.js +0 -52
- package/build/commands/element/isExisting.d.ts +0 -49
- package/build/commands/element/isExisting.d.ts.map +0 -1
- package/build/commands/element/isExisting.js +0 -65
- package/build/commands/element/isFocused.d.ts +0 -28
- package/build/commands/element/isFocused.d.ts.map +0 -1
- package/build/commands/element/isFocused.js +0 -42
- package/build/commands/element/isSelected.d.ts +0 -31
- package/build/commands/element/isSelected.d.ts.map +0 -1
- package/build/commands/element/isSelected.js +0 -35
- package/build/commands/element/moveTo.d.ts +0 -21
- package/build/commands/element/moveTo.d.ts.map +0 -1
- package/build/commands/element/moveTo.js +0 -39
- package/build/commands/element/nextElement.d.ts +0 -25
- package/build/commands/element/nextElement.d.ts.map +0 -1
- package/build/commands/element/nextElement.js +0 -31
- package/build/commands/element/parentElement.d.ts +0 -25
- package/build/commands/element/parentElement.d.ts.map +0 -1
- package/build/commands/element/parentElement.js +0 -31
- package/build/commands/element/previousElement.d.ts +0 -25
- package/build/commands/element/previousElement.d.ts.map +0 -1
- package/build/commands/element/previousElement.js +0 -31
- package/build/commands/element/react$$.d.ts +0 -36
- package/build/commands/element/react$$.d.ts.map +0 -1
- package/build/commands/element/react$$.js +0 -51
- package/build/commands/element/react$.d.ts +0 -46
- package/build/commands/element/react$.d.ts.map +0 -1
- package/build/commands/element/react$.js +0 -59
- package/build/commands/element/saveScreenshot.d.ts +0 -21
- package/build/commands/element/saveScreenshot.d.ts.map +0 -1
- package/build/commands/element/saveScreenshot.js +0 -40
- package/build/commands/element/scrollIntoView.d.ts +0 -21
- package/build/commands/element/scrollIntoView.d.ts.map +0 -1
- package/build/commands/element/scrollIntoView.js +0 -31
- package/build/commands/element/selectByAttribute.d.ts +0 -37
- package/build/commands/element/selectByAttribute.d.ts.map +0 -1
- package/build/commands/element/selectByAttribute.js +0 -59
- package/build/commands/element/selectByIndex.d.ts +0 -31
- package/build/commands/element/selectByIndex.d.ts.map +0 -1
- package/build/commands/element/selectByIndex.js +0 -55
- package/build/commands/element/selectByVisibleText.d.ts +0 -31
- package/build/commands/element/selectByVisibleText.d.ts.map +0 -1
- package/build/commands/element/selectByVisibleText.js +0 -66
- package/build/commands/element/setValue.d.ts +0 -29
- package/build/commands/element/setValue.d.ts.map +0 -1
- package/build/commands/element/setValue.js +0 -33
- package/build/commands/element/shadow$$.d.ts +0 -22
- package/build/commands/element/shadow$$.d.ts.map +0 -1
- package/build/commands/element/shadow$$.js +0 -27
- package/build/commands/element/shadow$.d.ts +0 -22
- package/build/commands/element/shadow$.d.ts.map +0 -1
- package/build/commands/element/shadow$.js +0 -27
- package/build/commands/element/touchAction.d.ts +0 -54
- package/build/commands/element/touchAction.d.ts.map +0 -1
- package/build/commands/element/touchAction.js +0 -58
- package/build/commands/element/waitForClickable.d.ts +0 -34
- package/build/commands/element/waitForClickable.d.ts.map +0 -1
- package/build/commands/element/waitForClickable.js +0 -37
- package/build/commands/element/waitForDisplayed.d.ts +0 -44
- package/build/commands/element/waitForDisplayed.d.ts.map +0 -1
- package/build/commands/element/waitForDisplayed.js +0 -47
- package/build/commands/element/waitForEnabled.d.ts +0 -46
- package/build/commands/element/waitForEnabled.d.ts.map +0 -1
- package/build/commands/element/waitForEnabled.js +0 -55
- package/build/commands/element/waitForExist.d.ts +0 -46
- package/build/commands/element/waitForExist.d.ts.map +0 -1
- package/build/commands/element/waitForExist.js +0 -49
- package/build/commands/element/waitUntil.d.ts +0 -49
- package/build/commands/element/waitUntil.d.ts.map +0 -1
- package/build/commands/element/waitUntil.js +0 -53
- package/build/commands/element.d.ts +0 -100
- package/build/commands/element.d.ts.map +0 -1
- package/build/commands/element.js +0 -63
- package/build/commands/mock/abort.d.ts +0 -19
- package/build/commands/mock/abort.d.ts.map +0 -1
- package/build/commands/mock/abort.js +0 -20
- package/build/commands/mock/abortOnce.d.ts +0 -27
- package/build/commands/mock/abortOnce.d.ts.map +0 -1
- package/build/commands/mock/abortOnce.js +0 -28
- package/build/commands/mock/clear.d.ts +0 -18
- package/build/commands/mock/clear.d.ts.map +0 -1
- package/build/commands/mock/clear.js +0 -19
- package/build/commands/mock/respond.d.ts +0 -54
- package/build/commands/mock/respond.d.ts.map +0 -1
- package/build/commands/mock/respond.js +0 -55
- package/build/commands/mock/respondOnce.d.ts +0 -55
- package/build/commands/mock/respondOnce.d.ts.map +0 -1
- package/build/commands/mock/respondOnce.js +0 -56
- package/build/commands/mock/restore.d.ts +0 -18
- package/build/commands/mock/restore.d.ts.map +0 -1
- package/build/commands/mock/restore.js +0 -19
- package/build/constants.d.ts +0 -14
- package/build/constants.d.ts.map +0 -1
- package/build/constants.js +0 -286
- package/build/index.d.ts +0 -45
- package/build/index.d.ts.map +0 -1
- package/build/index.js +0 -171
- package/build/middlewares.d.ts +0 -12
- package/build/middlewares.d.ts.map +0 -1
- package/build/middlewares.js +0 -65
- package/build/multiremote.d.ts +0 -71
- package/build/multiremote.d.ts.map +0 -1
- package/build/multiremote.js +0 -160
- package/build/protocol-stub.d.ts +0 -16
- package/build/protocol-stub.d.ts.map +0 -1
- package/build/protocol-stub.js +0 -77
- package/build/scripts/getHTML.d.ts +0 -9
- package/build/scripts/getHTML.d.ts.map +0 -1
- package/build/scripts/getHTML.js +0 -13
- package/build/scripts/getProperty.d.ts +0 -43
- package/build/scripts/getProperty.d.ts.map +0 -1
- package/build/scripts/getProperty.js +0 -12
- package/build/scripts/isElementClickable.d.ts +0 -7
- package/build/scripts/isElementClickable.d.ts.map +0 -1
- package/build/scripts/isElementClickable.js +0 -121
- package/build/scripts/isElementDisplayed.d.ts +0 -7
- package/build/scripts/isElementDisplayed.d.ts.map +0 -1
- package/build/scripts/isElementDisplayed.js +0 -216
- package/build/scripts/isElementInViewport.d.ts +0 -10
- package/build/scripts/isElementInViewport.d.ts.map +0 -1
- package/build/scripts/isElementInViewport.js +0 -22
- package/build/scripts/isFocused.d.ts +0 -7
- package/build/scripts/isFocused.d.ts.map +0 -1
- package/build/scripts/isFocused.js +0 -11
- package/build/scripts/newWindow.d.ts +0 -10
- package/build/scripts/newWindow.d.ts.map +0 -1
- package/build/scripts/newWindow.js +0 -14
- package/build/scripts/resq.d.ts +0 -6
- package/build/scripts/resq.d.ts.map +0 -1
- package/build/scripts/resq.js +0 -58
- package/build/scripts/shadowFnFactory.d.ts +0 -2
- package/build/scripts/shadowFnFactory.d.ts.map +0 -1
- package/build/scripts/shadowFnFactory.js +0 -17
- package/build/types.d.ts +0 -402
- package/build/types.d.ts.map +0 -1
- package/build/types.js +0 -2
- package/build/utils/SevereServiceError.d.ts +0 -7
- package/build/utils/SevereServiceError.d.ts.map +0 -1
- package/build/utils/SevereServiceError.js +0 -12
- package/build/utils/Timer.d.ts +0 -33
- package/build/utils/Timer.d.ts.map +0 -1
- package/build/utils/Timer.js +0 -126
- package/build/utils/detectBackend.d.ts +0 -23
- package/build/utils/detectBackend.d.ts.map +0 -1
- package/build/utils/detectBackend.js +0 -119
- package/build/utils/findStrategy.d.ts +0 -10
- package/build/utils/findStrategy.d.ts.map +0 -1
- package/build/utils/findStrategy.js +0 -267
- package/build/utils/getElementObject.d.ts +0 -17
- package/build/utils/getElementObject.d.ts.map +0 -1
- package/build/utils/getElementObject.js +0 -107
- package/build/utils/implicitWait.d.ts +0 -7
- package/build/utils/implicitWait.d.ts.map +0 -1
- package/build/utils/implicitWait.js +0 -39
- package/build/utils/index.d.ts +0 -102
- package/build/utils/index.d.ts.map +0 -1
- package/build/utils/index.js +0 -543
- package/build/utils/interception/devtools.d.ts +0 -61
- package/build/utils/interception/devtools.d.ts.map +0 -1
- package/build/utils/interception/devtools.js +0 -247
- package/build/utils/interception/index.d.ts +0 -26
- package/build/utils/interception/index.d.ts.map +0 -1
- package/build/utils/interception/index.js +0 -49
- package/build/utils/interception/types.d.ts +0 -94
- package/build/utils/interception/types.d.ts.map +0 -1
- package/build/utils/interception/types.js +0 -2
- package/build/utils/interception/webdriver.d.ts +0 -48
- package/build/utils/interception/webdriver.d.ts.map +0 -1
- package/build/utils/interception/webdriver.js +0 -75
- package/build/utils/refetchElement.d.ts +0 -6
- package/build/utils/refetchElement.d.ts.map +0 -1
- package/build/utils/refetchElement.js +0 -32
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import $$ from './element/$$';
|
|
2
|
-
import $ from './element/$';
|
|
3
|
-
import addValue from './element/addValue';
|
|
4
|
-
import clearValue from './element/clearValue';
|
|
5
|
-
import click from './element/click';
|
|
6
|
-
import custom$$ from './element/custom$$';
|
|
7
|
-
import custom$ from './element/custom$';
|
|
8
|
-
import doubleClick from './element/doubleClick';
|
|
9
|
-
import dragAndDrop from './element/dragAndDrop';
|
|
10
|
-
import getAttribute from './element/getAttribute';
|
|
11
|
-
import getCSSProperty from './element/getCSSProperty';
|
|
12
|
-
import getComputedRole from './element/getComputedRole';
|
|
13
|
-
import getComputedLabel from './element/getComputedLabel';
|
|
14
|
-
import getHTML from './element/getHTML';
|
|
15
|
-
import getLocation from './element/getLocation';
|
|
16
|
-
import getProperty from './element/getProperty';
|
|
17
|
-
import getSize from './element/getSize';
|
|
18
|
-
import getTagName from './element/getTagName';
|
|
19
|
-
import getText from './element/getText';
|
|
20
|
-
import getValue from './element/getValue';
|
|
21
|
-
import isClickable from './element/isClickable';
|
|
22
|
-
import isDisplayed from './element/isDisplayed';
|
|
23
|
-
import isDisplayedInViewport from './element/isDisplayedInViewport';
|
|
24
|
-
import isEnabled from './element/isEnabled';
|
|
25
|
-
import isEqual from './element/isEqual';
|
|
26
|
-
import isExisting from './element/isExisting';
|
|
27
|
-
import isFocused from './element/isFocused';
|
|
28
|
-
import isSelected from './element/isSelected';
|
|
29
|
-
import moveTo from './element/moveTo';
|
|
30
|
-
import nextElement from './element/nextElement';
|
|
31
|
-
import parentElement from './element/parentElement';
|
|
32
|
-
import previousElement from './element/previousElement';
|
|
33
|
-
import react$$ from './element/react$$';
|
|
34
|
-
import react$ from './element/react$';
|
|
35
|
-
import saveScreenshot from './element/saveScreenshot';
|
|
36
|
-
import scrollIntoView from './element/scrollIntoView';
|
|
37
|
-
import selectByAttribute from './element/selectByAttribute';
|
|
38
|
-
import selectByIndex from './element/selectByIndex';
|
|
39
|
-
import selectByVisibleText from './element/selectByVisibleText';
|
|
40
|
-
import setValue from './element/setValue';
|
|
41
|
-
import shadow$$ from './element/shadow$$';
|
|
42
|
-
import shadow$ from './element/shadow$';
|
|
43
|
-
import touchAction from './element/touchAction';
|
|
44
|
-
import waitForClickable from './element/waitForClickable';
|
|
45
|
-
import waitForDisplayed from './element/waitForDisplayed';
|
|
46
|
-
import waitForEnabled from './element/waitForEnabled';
|
|
47
|
-
import waitForExist from './element/waitForExist';
|
|
48
|
-
import waitUntil from './element/waitUntil';
|
|
49
|
-
declare const _default: {
|
|
50
|
-
$$: typeof $$;
|
|
51
|
-
$: typeof $;
|
|
52
|
-
addValue: typeof addValue;
|
|
53
|
-
clearValue: typeof clearValue;
|
|
54
|
-
click: typeof click;
|
|
55
|
-
custom$: typeof custom$;
|
|
56
|
-
custom$$: typeof custom$$;
|
|
57
|
-
doubleClick: typeof doubleClick;
|
|
58
|
-
dragAndDrop: typeof dragAndDrop;
|
|
59
|
-
getAttribute: typeof getAttribute;
|
|
60
|
-
getCSSProperty: typeof getCSSProperty;
|
|
61
|
-
getComputedRole: typeof getComputedRole;
|
|
62
|
-
getComputedLabel: typeof getComputedLabel;
|
|
63
|
-
getHTML: typeof getHTML;
|
|
64
|
-
getLocation: typeof getLocation;
|
|
65
|
-
getProperty: typeof getProperty;
|
|
66
|
-
getSize: typeof getSize;
|
|
67
|
-
getTagName: typeof getTagName;
|
|
68
|
-
getText: typeof getText;
|
|
69
|
-
getValue: typeof getValue;
|
|
70
|
-
isClickable: typeof isClickable;
|
|
71
|
-
isDisplayed: typeof isDisplayed;
|
|
72
|
-
isDisplayedInViewport: typeof isDisplayedInViewport;
|
|
73
|
-
isEnabled: typeof isEnabled;
|
|
74
|
-
isEqual: typeof isEqual;
|
|
75
|
-
isExisting: typeof isExisting;
|
|
76
|
-
isFocused: typeof isFocused;
|
|
77
|
-
isSelected: typeof isSelected;
|
|
78
|
-
moveTo: typeof moveTo;
|
|
79
|
-
nextElement: typeof nextElement;
|
|
80
|
-
parentElement: typeof parentElement;
|
|
81
|
-
previousElement: typeof previousElement;
|
|
82
|
-
react$: typeof react$;
|
|
83
|
-
react$$: typeof react$$;
|
|
84
|
-
saveScreenshot: typeof saveScreenshot;
|
|
85
|
-
scrollIntoView: typeof scrollIntoView;
|
|
86
|
-
selectByAttribute: typeof selectByAttribute;
|
|
87
|
-
selectByIndex: typeof selectByIndex;
|
|
88
|
-
selectByVisibleText: typeof selectByVisibleText;
|
|
89
|
-
setValue: typeof setValue;
|
|
90
|
-
shadow$: typeof shadow$;
|
|
91
|
-
shadow$$: typeof shadow$$;
|
|
92
|
-
touchAction: typeof touchAction;
|
|
93
|
-
waitForClickable: typeof waitForClickable;
|
|
94
|
-
waitForDisplayed: typeof waitForDisplayed;
|
|
95
|
-
waitForEnabled: typeof waitForEnabled;
|
|
96
|
-
waitForExist: typeof waitForExist;
|
|
97
|
-
waitUntil: typeof waitUntil;
|
|
98
|
-
};
|
|
99
|
-
export default _default;
|
|
100
|
-
//# sourceMappingURL=element.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../src/commands/element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,cAAc,CAAA;AAC7B,OAAO,CAAC,MAAM,aAAa,CAAA;AAC3B,OAAO,QAAQ,MAAM,oBAAoB,CAAA;AACzC,OAAO,UAAU,MAAM,sBAAsB,CAAA;AAC7C,OAAO,KAAK,MAAM,iBAAiB,CAAA;AACnC,OAAO,QAAQ,MAAM,oBAAoB,CAAA;AACzC,OAAO,OAAO,MAAM,mBAAmB,CAAA;AACvC,OAAO,WAAW,MAAM,uBAAuB,CAAA;AAC/C,OAAO,WAAW,MAAM,uBAAuB,CAAA;AAC/C,OAAO,YAAY,MAAM,wBAAwB,CAAA;AACjD,OAAO,cAAc,MAAM,0BAA0B,CAAA;AACrD,OAAO,eAAe,MAAM,2BAA2B,CAAA;AACvD,OAAO,gBAAgB,MAAM,4BAA4B,CAAA;AACzD,OAAO,OAAO,MAAM,mBAAmB,CAAA;AACvC,OAAO,WAAW,MAAM,uBAAuB,CAAA;AAC/C,OAAO,WAAW,MAAM,uBAAuB,CAAA;AAC/C,OAAO,OAAO,MAAM,mBAAmB,CAAA;AACvC,OAAO,UAAU,MAAM,sBAAsB,CAAA;AAC7C,OAAO,OAAO,MAAM,mBAAmB,CAAA;AACvC,OAAO,QAAQ,MAAM,oBAAoB,CAAA;AACzC,OAAO,WAAW,MAAM,uBAAuB,CAAA;AAC/C,OAAO,WAAW,MAAM,uBAAuB,CAAA;AAC/C,OAAO,qBAAqB,MAAM,iCAAiC,CAAA;AACnE,OAAO,SAAS,MAAM,qBAAqB,CAAA;AAC3C,OAAO,OAAO,MAAM,mBAAmB,CAAA;AACvC,OAAO,UAAU,MAAM,sBAAsB,CAAA;AAC7C,OAAO,SAAS,MAAM,qBAAqB,CAAA;AAC3C,OAAO,UAAU,MAAM,sBAAsB,CAAA;AAC7C,OAAO,MAAM,MAAM,kBAAkB,CAAA;AACrC,OAAO,WAAW,MAAM,uBAAuB,CAAA;AAC/C,OAAO,aAAa,MAAM,yBAAyB,CAAA;AACnD,OAAO,eAAe,MAAM,2BAA2B,CAAA;AACvD,OAAO,OAAO,MAAM,mBAAmB,CAAA;AACvC,OAAO,MAAM,MAAM,kBAAkB,CAAA;AACrC,OAAO,cAAc,MAAM,0BAA0B,CAAA;AACrD,OAAO,cAAc,MAAM,0BAA0B,CAAA;AACrD,OAAO,iBAAiB,MAAM,6BAA6B,CAAA;AAC3D,OAAO,aAAa,MAAM,yBAAyB,CAAA;AACnD,OAAO,mBAAmB,MAAM,+BAA+B,CAAA;AAC/D,OAAO,QAAQ,MAAM,oBAAoB,CAAA;AACzC,OAAO,QAAQ,MAAM,oBAAoB,CAAA;AACzC,OAAO,OAAO,MAAM,mBAAmB,CAAA;AACvC,OAAO,WAAW,MAAM,uBAAuB,CAAA;AAC/C,OAAO,gBAAgB,MAAM,4BAA4B,CAAA;AACzD,OAAO,gBAAgB,MAAM,4BAA4B,CAAA;AACzD,OAAO,cAAc,MAAM,0BAA0B,CAAA;AACrD,OAAO,YAAY,MAAM,wBAAwB,CAAA;AACjD,OAAO,SAAS,MAAM,qBAAqB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3C,wBASC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const __1 = __importDefault(require("./element/$$"));
|
|
7
|
-
const _1 = __importDefault(require("./element/$"));
|
|
8
|
-
const addValue_1 = __importDefault(require("./element/addValue"));
|
|
9
|
-
const clearValue_1 = __importDefault(require("./element/clearValue"));
|
|
10
|
-
const click_1 = __importDefault(require("./element/click"));
|
|
11
|
-
const custom__1 = __importDefault(require("./element/custom$$"));
|
|
12
|
-
const custom_1 = __importDefault(require("./element/custom$"));
|
|
13
|
-
const doubleClick_1 = __importDefault(require("./element/doubleClick"));
|
|
14
|
-
const dragAndDrop_1 = __importDefault(require("./element/dragAndDrop"));
|
|
15
|
-
const getAttribute_1 = __importDefault(require("./element/getAttribute"));
|
|
16
|
-
const getCSSProperty_1 = __importDefault(require("./element/getCSSProperty"));
|
|
17
|
-
const getComputedRole_1 = __importDefault(require("./element/getComputedRole"));
|
|
18
|
-
const getComputedLabel_1 = __importDefault(require("./element/getComputedLabel"));
|
|
19
|
-
const getHTML_1 = __importDefault(require("./element/getHTML"));
|
|
20
|
-
const getLocation_1 = __importDefault(require("./element/getLocation"));
|
|
21
|
-
const getProperty_1 = __importDefault(require("./element/getProperty"));
|
|
22
|
-
const getSize_1 = __importDefault(require("./element/getSize"));
|
|
23
|
-
const getTagName_1 = __importDefault(require("./element/getTagName"));
|
|
24
|
-
const getText_1 = __importDefault(require("./element/getText"));
|
|
25
|
-
const getValue_1 = __importDefault(require("./element/getValue"));
|
|
26
|
-
const isClickable_1 = __importDefault(require("./element/isClickable"));
|
|
27
|
-
const isDisplayed_1 = __importDefault(require("./element/isDisplayed"));
|
|
28
|
-
const isDisplayedInViewport_1 = __importDefault(require("./element/isDisplayedInViewport"));
|
|
29
|
-
const isEnabled_1 = __importDefault(require("./element/isEnabled"));
|
|
30
|
-
const isEqual_1 = __importDefault(require("./element/isEqual"));
|
|
31
|
-
const isExisting_1 = __importDefault(require("./element/isExisting"));
|
|
32
|
-
const isFocused_1 = __importDefault(require("./element/isFocused"));
|
|
33
|
-
const isSelected_1 = __importDefault(require("./element/isSelected"));
|
|
34
|
-
const moveTo_1 = __importDefault(require("./element/moveTo"));
|
|
35
|
-
const nextElement_1 = __importDefault(require("./element/nextElement"));
|
|
36
|
-
const parentElement_1 = __importDefault(require("./element/parentElement"));
|
|
37
|
-
const previousElement_1 = __importDefault(require("./element/previousElement"));
|
|
38
|
-
const react__1 = __importDefault(require("./element/react$$"));
|
|
39
|
-
const react_1 = __importDefault(require("./element/react$"));
|
|
40
|
-
const saveScreenshot_1 = __importDefault(require("./element/saveScreenshot"));
|
|
41
|
-
const scrollIntoView_1 = __importDefault(require("./element/scrollIntoView"));
|
|
42
|
-
const selectByAttribute_1 = __importDefault(require("./element/selectByAttribute"));
|
|
43
|
-
const selectByIndex_1 = __importDefault(require("./element/selectByIndex"));
|
|
44
|
-
const selectByVisibleText_1 = __importDefault(require("./element/selectByVisibleText"));
|
|
45
|
-
const setValue_1 = __importDefault(require("./element/setValue"));
|
|
46
|
-
const shadow__1 = __importDefault(require("./element/shadow$$"));
|
|
47
|
-
const shadow_1 = __importDefault(require("./element/shadow$"));
|
|
48
|
-
const touchAction_1 = __importDefault(require("./element/touchAction"));
|
|
49
|
-
const waitForClickable_1 = __importDefault(require("./element/waitForClickable"));
|
|
50
|
-
const waitForDisplayed_1 = __importDefault(require("./element/waitForDisplayed"));
|
|
51
|
-
const waitForEnabled_1 = __importDefault(require("./element/waitForEnabled"));
|
|
52
|
-
const waitForExist_1 = __importDefault(require("./element/waitForExist"));
|
|
53
|
-
const waitUntil_1 = __importDefault(require("./element/waitUntil"));
|
|
54
|
-
exports.default = {
|
|
55
|
-
$$: __1.default, $: _1.default, addValue: addValue_1.default, clearValue: clearValue_1.default, click: click_1.default, custom$: custom_1.default, custom$$: custom__1.default, doubleClick: doubleClick_1.default, dragAndDrop: dragAndDrop_1.default,
|
|
56
|
-
getAttribute: getAttribute_1.default, getCSSProperty: getCSSProperty_1.default, getComputedRole: getComputedRole_1.default, getComputedLabel: getComputedLabel_1.default, getHTML: getHTML_1.default, getLocation: getLocation_1.default,
|
|
57
|
-
getProperty: getProperty_1.default, getSize: getSize_1.default, getTagName: getTagName_1.default, getText: getText_1.default, getValue: getValue_1.default, isClickable: isClickable_1.default, isDisplayed: isDisplayed_1.default,
|
|
58
|
-
isDisplayedInViewport: isDisplayedInViewport_1.default, isEnabled: isEnabled_1.default, isEqual: isEqual_1.default, isExisting: isExisting_1.default, isFocused: isFocused_1.default, isSelected: isSelected_1.default,
|
|
59
|
-
moveTo: moveTo_1.default, nextElement: nextElement_1.default, parentElement: parentElement_1.default, previousElement: previousElement_1.default, react$: react_1.default, react$$: react__1.default, saveScreenshot: saveScreenshot_1.default,
|
|
60
|
-
scrollIntoView: scrollIntoView_1.default, selectByAttribute: selectByAttribute_1.default, selectByIndex: selectByIndex_1.default, selectByVisibleText: selectByVisibleText_1.default, setValue: setValue_1.default,
|
|
61
|
-
shadow$: shadow_1.default, shadow$$: shadow__1.default, touchAction: touchAction_1.default, waitForClickable: waitForClickable_1.default, waitForDisplayed: waitForDisplayed_1.default, waitForEnabled: waitForEnabled_1.default,
|
|
62
|
-
waitForExist: waitForExist_1.default, waitUntil: waitUntil_1.default
|
|
63
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Abort the request with one of the following error codes:
|
|
3
|
-
* `Failed`, `Aborted`, `TimedOut`, `AccessDenied`, `ConnectionClosed`,
|
|
4
|
-
* `ConnectionReset`, `ConnectionRefused`, `ConnectionAborted`,
|
|
5
|
-
* `ConnectionFailed`, `NameNotResolved`, `InternetDisconnected`,
|
|
6
|
-
* `AddressUnreachable`, `BlockedByClient`, `BlockedByResponse`.
|
|
7
|
-
*
|
|
8
|
-
* <example>
|
|
9
|
-
:abort.js
|
|
10
|
-
it('should block Google Analytics from page', async () => {
|
|
11
|
-
const mock = await browser.mock('https://www.google-analytics.com/**')
|
|
12
|
-
mock.abort('Failed')
|
|
13
|
-
})
|
|
14
|
-
* </example>
|
|
15
|
-
*
|
|
16
|
-
* @alias mock.abort
|
|
17
|
-
* @param {ErrorCode} errorCode error code of the response, can be one of: `Failed`, `Aborted`, `TimedOut`, `AccessDenied`, `ConnectionClosed`, `ConnectionReset`, `ConnectionRefused`, `ConnectionAborted`, `ConnectionFailed`, `NameNotResolved`, `InternetDisconnected`, `AddressUnreachable`, `BlockedByClient`, `BlockedByResponse`
|
|
18
|
-
*/
|
|
19
|
-
//# sourceMappingURL=abort.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"abort.d.ts","sourceRoot":"","sources":["../../../src/commands/mock/abort.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Abort the request with one of the following error codes:
|
|
4
|
-
* `Failed`, `Aborted`, `TimedOut`, `AccessDenied`, `ConnectionClosed`,
|
|
5
|
-
* `ConnectionReset`, `ConnectionRefused`, `ConnectionAborted`,
|
|
6
|
-
* `ConnectionFailed`, `NameNotResolved`, `InternetDisconnected`,
|
|
7
|
-
* `AddressUnreachable`, `BlockedByClient`, `BlockedByResponse`.
|
|
8
|
-
*
|
|
9
|
-
* <example>
|
|
10
|
-
:abort.js
|
|
11
|
-
it('should block Google Analytics from page', async () => {
|
|
12
|
-
const mock = await browser.mock('https://www.google-analytics.com/**')
|
|
13
|
-
mock.abort('Failed')
|
|
14
|
-
})
|
|
15
|
-
* </example>
|
|
16
|
-
*
|
|
17
|
-
* @alias mock.abort
|
|
18
|
-
* @param {ErrorCode} errorCode error code of the response, can be one of: `Failed`, `Aborted`, `TimedOut`, `AccessDenied`, `ConnectionClosed`, `ConnectionReset`, `ConnectionRefused`, `ConnectionAborted`, `ConnectionFailed`, `NameNotResolved`, `InternetDisconnected`, `AddressUnreachable`, `BlockedByClient`, `BlockedByResponse`
|
|
19
|
-
*/
|
|
20
|
-
// actual implementation is located in packages/webdriverio/src/utils/interception
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Abort the request once with one of the following error codes:
|
|
3
|
-
* `Failed`, `Aborted`, `TimedOut`, `AccessDenied`, `ConnectionClosed`,
|
|
4
|
-
* `ConnectionReset`, `ConnectionRefused`, `ConnectionAborted`,
|
|
5
|
-
* `ConnectionFailed`, `NameNotResolved`, `InternetDisconnected`,
|
|
6
|
-
* `AddressUnreachable`, `BlockedByClient`, `BlockedByResponse`.
|
|
7
|
-
*
|
|
8
|
-
* <example>
|
|
9
|
-
:abortOnce.js
|
|
10
|
-
it('should block mock only once', async () => {
|
|
11
|
-
const mock = await browser.mock('https://webdriver.io')
|
|
12
|
-
mock.abortOnce('Failed')
|
|
13
|
-
|
|
14
|
-
await browser.url('https://webdriver.io')
|
|
15
|
-
// catch failing command as page can't be loaded
|
|
16
|
-
.catch(() => {})
|
|
17
|
-
console.log(await browser.getTitle()) // outputs: ""
|
|
18
|
-
|
|
19
|
-
await browser.url('https://webdriver.io')
|
|
20
|
-
console.log(await browser.getTitle()) // outputs: "WebdriverIO · Next-gen browser and mobile automation test framework for Node.js"
|
|
21
|
-
})
|
|
22
|
-
* </example>
|
|
23
|
-
*
|
|
24
|
-
* @alias mock.abort
|
|
25
|
-
* @param {ErrorCode} errorCode error code of the response, can be one of: `Failed`, `Aborted`, `TimedOut`, `AccessDenied`, `ConnectionClosed`, `ConnectionReset`, `ConnectionRefused`, `ConnectionAborted`, `ConnectionFailed`, `NameNotResolved`, `InternetDisconnected`, `AddressUnreachable`, `BlockedByClient`, `BlockedByResponse`
|
|
26
|
-
*/
|
|
27
|
-
//# sourceMappingURL=abortOnce.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"abortOnce.d.ts","sourceRoot":"","sources":["../../../src/commands/mock/abortOnce.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Abort the request once with one of the following error codes:
|
|
4
|
-
* `Failed`, `Aborted`, `TimedOut`, `AccessDenied`, `ConnectionClosed`,
|
|
5
|
-
* `ConnectionReset`, `ConnectionRefused`, `ConnectionAborted`,
|
|
6
|
-
* `ConnectionFailed`, `NameNotResolved`, `InternetDisconnected`,
|
|
7
|
-
* `AddressUnreachable`, `BlockedByClient`, `BlockedByResponse`.
|
|
8
|
-
*
|
|
9
|
-
* <example>
|
|
10
|
-
:abortOnce.js
|
|
11
|
-
it('should block mock only once', async () => {
|
|
12
|
-
const mock = await browser.mock('https://webdriver.io')
|
|
13
|
-
mock.abortOnce('Failed')
|
|
14
|
-
|
|
15
|
-
await browser.url('https://webdriver.io')
|
|
16
|
-
// catch failing command as page can't be loaded
|
|
17
|
-
.catch(() => {})
|
|
18
|
-
console.log(await browser.getTitle()) // outputs: ""
|
|
19
|
-
|
|
20
|
-
await browser.url('https://webdriver.io')
|
|
21
|
-
console.log(await browser.getTitle()) // outputs: "WebdriverIO · Next-gen browser and mobile automation test framework for Node.js"
|
|
22
|
-
})
|
|
23
|
-
* </example>
|
|
24
|
-
*
|
|
25
|
-
* @alias mock.abort
|
|
26
|
-
* @param {ErrorCode} errorCode error code of the response, can be one of: `Failed`, `Aborted`, `TimedOut`, `AccessDenied`, `ConnectionClosed`, `ConnectionReset`, `ConnectionRefused`, `ConnectionAborted`, `ConnectionFailed`, `NameNotResolved`, `InternetDisconnected`, `AddressUnreachable`, `BlockedByClient`, `BlockedByResponse`
|
|
27
|
-
*/
|
|
28
|
-
// actual implementation is located in packages/webdriverio/src/utils/interception
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Resets all information stored in the `mock.calls` array.
|
|
3
|
-
*
|
|
4
|
-
* <example>
|
|
5
|
-
:clear.js
|
|
6
|
-
it('should clear mock', async () => {
|
|
7
|
-
const mock = await browser.mock('https://google.com/')
|
|
8
|
-
await browser.url('https://google.com')
|
|
9
|
-
|
|
10
|
-
console.log(mock.calls.length) // returns 1
|
|
11
|
-
mock.clear()
|
|
12
|
-
console.log(mock.calls.length) // returns 0
|
|
13
|
-
})
|
|
14
|
-
* </example>
|
|
15
|
-
*
|
|
16
|
-
* @alias mock.clear
|
|
17
|
-
*/
|
|
18
|
-
//# sourceMappingURL=clear.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"clear.d.ts","sourceRoot":"","sources":["../../../src/commands/mock/clear.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Resets all information stored in the `mock.calls` array.
|
|
4
|
-
*
|
|
5
|
-
* <example>
|
|
6
|
-
:clear.js
|
|
7
|
-
it('should clear mock', async () => {
|
|
8
|
-
const mock = await browser.mock('https://google.com/')
|
|
9
|
-
await browser.url('https://google.com')
|
|
10
|
-
|
|
11
|
-
console.log(mock.calls.length) // returns 1
|
|
12
|
-
mock.clear()
|
|
13
|
-
console.log(mock.calls.length) // returns 0
|
|
14
|
-
})
|
|
15
|
-
* </example>
|
|
16
|
-
*
|
|
17
|
-
* @alias mock.clear
|
|
18
|
-
*/
|
|
19
|
-
// actual implementation is located in packages/webdriverio/src/utils/interception
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Always respond with same overwrite.
|
|
3
|
-
*
|
|
4
|
-
* <example>
|
|
5
|
-
:respond.js
|
|
6
|
-
it('should demonstrate response overwrite with static data', async () => {
|
|
7
|
-
const mock = await browser.mock('https://todo-backend-express-knex.herokuapp.com/', {
|
|
8
|
-
method: 'get'
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
mock.respond([{
|
|
12
|
-
title: 'Injected (non) completed Todo',
|
|
13
|
-
order: null,
|
|
14
|
-
completed: false
|
|
15
|
-
}, {
|
|
16
|
-
title: 'Injected completed Todo',
|
|
17
|
-
order: null,
|
|
18
|
-
completed: true
|
|
19
|
-
}], {
|
|
20
|
-
statusCode: 200,
|
|
21
|
-
fetchResponse: true // default
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
await browser.url('https://todobackend.com/client/index.html?https://todo-backend-express-knex.herokuapp.com/')
|
|
25
|
-
|
|
26
|
-
await $('#todo-list li').waitForExist()
|
|
27
|
-
console.log(await $$('#todo-list li').map(el => el.getText()))
|
|
28
|
-
// outputs: "[ 'Injected (non) completed Todo', 'Injected completed Todo' ]"
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
it('should demonstrate response overwrite with dynamic data', async () => {
|
|
32
|
-
const mock = await browser.mock('https://todo-backend-express-knex.herokuapp.com/')
|
|
33
|
-
|
|
34
|
-
mock.respond((request) => {
|
|
35
|
-
if (request.body.username === 'test') {
|
|
36
|
-
return { ...request.body, foo: 'bar' }
|
|
37
|
-
}
|
|
38
|
-
return request.body
|
|
39
|
-
}, {
|
|
40
|
-
statusCode: () => 200,
|
|
41
|
-
headers: () => ({ foo: 'bar }),
|
|
42
|
-
fetchResponse: false // do not fetch real response
|
|
43
|
-
})
|
|
44
|
-
})
|
|
45
|
-
* </example>
|
|
46
|
-
*
|
|
47
|
-
* @alias mock.respond
|
|
48
|
-
* @param {MockOverwrite} overwrites payload to overwrite the response
|
|
49
|
-
* @param {MockResponseParams=} params additional respond parameters to overwrite
|
|
50
|
-
* @param {Object=} params.header overwrite specific headers
|
|
51
|
-
* @param {Number=} params.statusCode overwrite response status code
|
|
52
|
-
* @param {Boolean=} params.fetchResponse fetch real response before responding with mocked data
|
|
53
|
-
*/
|
|
54
|
-
//# sourceMappingURL=respond.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"respond.d.ts","sourceRoot":"","sources":["../../../src/commands/mock/respond.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Always respond with same overwrite.
|
|
4
|
-
*
|
|
5
|
-
* <example>
|
|
6
|
-
:respond.js
|
|
7
|
-
it('should demonstrate response overwrite with static data', async () => {
|
|
8
|
-
const mock = await browser.mock('https://todo-backend-express-knex.herokuapp.com/', {
|
|
9
|
-
method: 'get'
|
|
10
|
-
})
|
|
11
|
-
|
|
12
|
-
mock.respond([{
|
|
13
|
-
title: 'Injected (non) completed Todo',
|
|
14
|
-
order: null,
|
|
15
|
-
completed: false
|
|
16
|
-
}, {
|
|
17
|
-
title: 'Injected completed Todo',
|
|
18
|
-
order: null,
|
|
19
|
-
completed: true
|
|
20
|
-
}], {
|
|
21
|
-
statusCode: 200,
|
|
22
|
-
fetchResponse: true // default
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
await browser.url('https://todobackend.com/client/index.html?https://todo-backend-express-knex.herokuapp.com/')
|
|
26
|
-
|
|
27
|
-
await $('#todo-list li').waitForExist()
|
|
28
|
-
console.log(await $$('#todo-list li').map(el => el.getText()))
|
|
29
|
-
// outputs: "[ 'Injected (non) completed Todo', 'Injected completed Todo' ]"
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
it('should demonstrate response overwrite with dynamic data', async () => {
|
|
33
|
-
const mock = await browser.mock('https://todo-backend-express-knex.herokuapp.com/')
|
|
34
|
-
|
|
35
|
-
mock.respond((request) => {
|
|
36
|
-
if (request.body.username === 'test') {
|
|
37
|
-
return { ...request.body, foo: 'bar' }
|
|
38
|
-
}
|
|
39
|
-
return request.body
|
|
40
|
-
}, {
|
|
41
|
-
statusCode: () => 200,
|
|
42
|
-
headers: () => ({ foo: 'bar }),
|
|
43
|
-
fetchResponse: false // do not fetch real response
|
|
44
|
-
})
|
|
45
|
-
})
|
|
46
|
-
* </example>
|
|
47
|
-
*
|
|
48
|
-
* @alias mock.respond
|
|
49
|
-
* @param {MockOverwrite} overwrites payload to overwrite the response
|
|
50
|
-
* @param {MockResponseParams=} params additional respond parameters to overwrite
|
|
51
|
-
* @param {Object=} params.header overwrite specific headers
|
|
52
|
-
* @param {Number=} params.statusCode overwrite response status code
|
|
53
|
-
* @param {Boolean=} params.fetchResponse fetch real response before responding with mocked data
|
|
54
|
-
*/
|
|
55
|
-
// actual implementation is located in packages/webdriverio/src/utils/interception
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Only respond once with given overwrite. You can call `respondOnce` multiple
|
|
3
|
-
* consecutive times and it will start with the respond you defined last. If you
|
|
4
|
-
* only use `respondOnce` and the resource is called more times a mock has been
|
|
5
|
-
* defined than it defaults back to the original resource.
|
|
6
|
-
*
|
|
7
|
-
* <example>
|
|
8
|
-
:respondOnce.js
|
|
9
|
-
async function getToDos () {
|
|
10
|
-
await $('#todo-list li').waitForExist()
|
|
11
|
-
return $$('#todo-list li').map(el => el.getText())
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
it('should demonstrate the respondOnce command', async () => {
|
|
15
|
-
const mock = await browser.mock('https://todo-backend-express-knex.herokuapp.com/', {
|
|
16
|
-
method: 'get'
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
mock.respondOnce([{
|
|
20
|
-
title: '3'
|
|
21
|
-
}, {
|
|
22
|
-
title: '2'
|
|
23
|
-
}, {
|
|
24
|
-
title: '1'
|
|
25
|
-
}])
|
|
26
|
-
|
|
27
|
-
mock.respondOnce([{
|
|
28
|
-
title: '2'
|
|
29
|
-
}, {
|
|
30
|
-
title: '1'
|
|
31
|
-
}])
|
|
32
|
-
|
|
33
|
-
mock.respondOnce([{
|
|
34
|
-
title: '1'
|
|
35
|
-
}])
|
|
36
|
-
|
|
37
|
-
await browser.url('https://todobackend.com/client/index.html?https://todo-backend-express-knex.herokuapp.com/')
|
|
38
|
-
console.log(await getToDos()) // outputs [ '3', '2', '1' ]
|
|
39
|
-
await browser.url('https://todobackend.com/client/index.html?https://todo-backend-express-knex.herokuapp.com/')
|
|
40
|
-
console.log(await getToDos()) // outputs [ '2', '1' ]
|
|
41
|
-
await browser.url('https://todobackend.com/client/index.html?https://todo-backend-express-knex.herokuapp.com/')
|
|
42
|
-
console.log(await getToDos()) // outputs [ '1' ]
|
|
43
|
-
await browser.url('https://todobackend.com/client/index.html?https://todo-backend-express-knex.herokuapp.com/')
|
|
44
|
-
console.log(await getToDos()) // outputs actual resource response
|
|
45
|
-
})
|
|
46
|
-
* </example>
|
|
47
|
-
*
|
|
48
|
-
* @alias mock.respondOnce
|
|
49
|
-
* @param {MockOverwrite} overwrites payload to overwrite the response
|
|
50
|
-
* @param {MockResponseParams=} params additional respond parameters to overwrite
|
|
51
|
-
* @param {Object=} params.header overwrite specific headers
|
|
52
|
-
* @param {Number=} params.statusCode overwrite response status code
|
|
53
|
-
* @param {Boolean=} params.fetchResponse fetch real response before responding with mocked data
|
|
54
|
-
*/
|
|
55
|
-
//# sourceMappingURL=respondOnce.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"respondOnce.d.ts","sourceRoot":"","sources":["../../../src/commands/mock/respondOnce.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Only respond once with given overwrite. You can call `respondOnce` multiple
|
|
4
|
-
* consecutive times and it will start with the respond you defined last. If you
|
|
5
|
-
* only use `respondOnce` and the resource is called more times a mock has been
|
|
6
|
-
* defined than it defaults back to the original resource.
|
|
7
|
-
*
|
|
8
|
-
* <example>
|
|
9
|
-
:respondOnce.js
|
|
10
|
-
async function getToDos () {
|
|
11
|
-
await $('#todo-list li').waitForExist()
|
|
12
|
-
return $$('#todo-list li').map(el => el.getText())
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
it('should demonstrate the respondOnce command', async () => {
|
|
16
|
-
const mock = await browser.mock('https://todo-backend-express-knex.herokuapp.com/', {
|
|
17
|
-
method: 'get'
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
mock.respondOnce([{
|
|
21
|
-
title: '3'
|
|
22
|
-
}, {
|
|
23
|
-
title: '2'
|
|
24
|
-
}, {
|
|
25
|
-
title: '1'
|
|
26
|
-
}])
|
|
27
|
-
|
|
28
|
-
mock.respondOnce([{
|
|
29
|
-
title: '2'
|
|
30
|
-
}, {
|
|
31
|
-
title: '1'
|
|
32
|
-
}])
|
|
33
|
-
|
|
34
|
-
mock.respondOnce([{
|
|
35
|
-
title: '1'
|
|
36
|
-
}])
|
|
37
|
-
|
|
38
|
-
await browser.url('https://todobackend.com/client/index.html?https://todo-backend-express-knex.herokuapp.com/')
|
|
39
|
-
console.log(await getToDos()) // outputs [ '3', '2', '1' ]
|
|
40
|
-
await browser.url('https://todobackend.com/client/index.html?https://todo-backend-express-knex.herokuapp.com/')
|
|
41
|
-
console.log(await getToDos()) // outputs [ '2', '1' ]
|
|
42
|
-
await browser.url('https://todobackend.com/client/index.html?https://todo-backend-express-knex.herokuapp.com/')
|
|
43
|
-
console.log(await getToDos()) // outputs [ '1' ]
|
|
44
|
-
await browser.url('https://todobackend.com/client/index.html?https://todo-backend-express-knex.herokuapp.com/')
|
|
45
|
-
console.log(await getToDos()) // outputs actual resource response
|
|
46
|
-
})
|
|
47
|
-
* </example>
|
|
48
|
-
*
|
|
49
|
-
* @alias mock.respondOnce
|
|
50
|
-
* @param {MockOverwrite} overwrites payload to overwrite the response
|
|
51
|
-
* @param {MockResponseParams=} params additional respond parameters to overwrite
|
|
52
|
-
* @param {Object=} params.header overwrite specific headers
|
|
53
|
-
* @param {Number=} params.statusCode overwrite response status code
|
|
54
|
-
* @param {Boolean=} params.fetchResponse fetch real response before responding with mocked data
|
|
55
|
-
*/
|
|
56
|
-
// actual implementation is located in packages/webdriverio/src/utils/interception
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Does everything that `mock.clear()` does, and also removes any mocked return values or implementations.
|
|
3
|
-
*
|
|
4
|
-
* <example>
|
|
5
|
-
:addValue.js
|
|
6
|
-
it('should demonstrate the addValue command', async () => {
|
|
7
|
-
const mock = await browser.mock('**\/googlelogo_color_272x92dp.png')
|
|
8
|
-
mock.respond('https://webdriver.io/img/webdriverio.png')
|
|
9
|
-
await browser.url('https://google.com') // shows WebdriverIO logo instead of Google
|
|
10
|
-
|
|
11
|
-
mock.restore()
|
|
12
|
-
await browser.url('https://google.com') // shows normal Google logo again
|
|
13
|
-
})
|
|
14
|
-
* </example>
|
|
15
|
-
*
|
|
16
|
-
* @alias mock.restore
|
|
17
|
-
*/
|
|
18
|
-
//# sourceMappingURL=restore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"restore.d.ts","sourceRoot":"","sources":["../../../src/commands/mock/restore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Does everything that `mock.clear()` does, and also removes any mocked return values or implementations.
|
|
4
|
-
*
|
|
5
|
-
* <example>
|
|
6
|
-
:addValue.js
|
|
7
|
-
it('should demonstrate the addValue command', async () => {
|
|
8
|
-
const mock = await browser.mock('**\/googlelogo_color_272x92dp.png')
|
|
9
|
-
mock.respond('https://webdriver.io/img/webdriverio.png')
|
|
10
|
-
await browser.url('https://google.com') // shows WebdriverIO logo instead of Google
|
|
11
|
-
|
|
12
|
-
mock.restore()
|
|
13
|
-
await browser.url('https://google.com') // shows normal Google logo again
|
|
14
|
-
})
|
|
15
|
-
* </example>
|
|
16
|
-
*
|
|
17
|
-
* @alias mock.restore
|
|
18
|
-
*/
|
|
19
|
-
// actual implementation is located in packages/webdriverio/src/utils/interception
|
package/build/constants.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Options } from '@wdio/types';
|
|
2
|
-
export declare const ELEMENT_KEY = "element-6066-11e4-a52e-4f735466cecf";
|
|
3
|
-
export declare const WDIO_DEFAULTS: Options.Definition<Options.WebdriverIO & Options.Testrunner>;
|
|
4
|
-
export declare const W3C_SELECTOR_STRATEGIES: string[];
|
|
5
|
-
export declare const DRIVER_DEFAULT_ENDPOINT: {
|
|
6
|
-
method: string;
|
|
7
|
-
host: string;
|
|
8
|
-
port: number;
|
|
9
|
-
path: string;
|
|
10
|
-
};
|
|
11
|
-
export declare const FF_REMOTE_DEBUG_ARG = "-remote-debugging-port";
|
|
12
|
-
export declare const DEEP_SELECTOR = ">>>";
|
|
13
|
-
export declare const ERROR_REASON: string[];
|
|
14
|
-
//# sourceMappingURL=constants.d.ts.map
|
package/build/constants.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAqC,MAAM,aAAa,CAAA;AA4B7E,eAAO,MAAM,WAAW,wCAAwC,CAAA;AAEhE,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC,UAAU,CAsQtF,CAAA;AAED,eAAO,MAAM,uBAAuB,UAA0E,CAAA;AAE9G,eAAO,MAAM,uBAAuB;;;;;CAKnC,CAAA;AAED,eAAO,MAAM,mBAAmB,2BAA2B,CAAA;AAC3D,eAAO,MAAM,aAAa,QAAQ,CAAA;AAElC,eAAO,MAAM,YAAY,UAKxB,CAAA"}
|