webdriverio 9.3.0 → 9.3.1
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/build/commands/mobile/scrollIntoView.d.ts +48 -0
- package/build/commands/mobile/scrollIntoView.d.ts.map +1 -0
- package/build/context.d.ts +2 -0
- package/build/context.d.ts.map +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +75 -4
- package/build/utils/index.d.ts.map +1 -1
- package/build/utils/interception/index.d.ts.map +1 -1
- package/build/utils/mobile.d.ts +10 -0
- package/build/utils/mobile.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Scroll element into viewport for Desktop/Mobile Web <strong>AND</strong> Mobile Native Apps.
|
|
5
|
+
*
|
|
6
|
+
* :::info
|
|
7
|
+
*
|
|
8
|
+
* Scrolling for Mobile Native Apps is done based on native mobile gestures. It is only supported for the following drivers:
|
|
9
|
+
* - [appium-uiautomator2-driver](https://github.com/appium/appium-uiautomator2-driver/blob/master/docs/android-mobile-gestures.md#mobile-scrollgesture) for Android
|
|
10
|
+
* - [appium-xcuitest-driver](https://appium.github.io/appium-xcuitest-driver/latest/reference/execute-methods/#mobile-scroll) for iOS
|
|
11
|
+
*
|
|
12
|
+
* :::
|
|
13
|
+
*
|
|
14
|
+
* <example>
|
|
15
|
+
:desktop.mobile.web.scrollIntoView.js
|
|
16
|
+
it('should demonstrate the desktop/mobile web scrollIntoView command', async () => {
|
|
17
|
+
const elem = await $('#myElement');
|
|
18
|
+
// scroll to specific element
|
|
19
|
+
await elem.scrollIntoView();
|
|
20
|
+
// center element within the viewport
|
|
21
|
+
await elem.scrollIntoView({ block: 'center', inline: 'center' });
|
|
22
|
+
});
|
|
23
|
+
* </example>
|
|
24
|
+
*
|
|
25
|
+
* <example>
|
|
26
|
+
:mobile.native.app.scrollIntoView.js
|
|
27
|
+
it('should demonstrate the mobile native app scrollIntoView command', async () => {
|
|
28
|
+
const elem = await $('#myElement');
|
|
29
|
+
// scroll to a specific element in the default scrollable element for Android or iOS for a maximum of 10 scrolls
|
|
30
|
+
await elem.scrollIntoView();
|
|
31
|
+
// Scroll to the left in the scrollable element called '#scrollable' for a maximum of 5 scrolls
|
|
32
|
+
await elem.scrollIntoView({ direction: 'left', maxScrolls: 5, scrollableElement: $('#scrollable') });
|
|
33
|
+
});
|
|
34
|
+
* </example>
|
|
35
|
+
*
|
|
36
|
+
* @alias element.scrollIntoView
|
|
37
|
+
* @param {object|boolean=} options options for `Element.scrollIntoView()`. Default for desktop/mobile web: <br/> `{ block: 'start', inline: 'nearest' }` <br /> Default for Mobile Native App <br /> `{ maxScrolls: 10, scrollDirection: 'down' }`
|
|
38
|
+
* @param {string=} options.behavior See [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView). <br /><strong>WEB-ONLY</strong> (Desktop/Mobile)
|
|
39
|
+
* @param {string=} options.block See [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView). <br /><strong>WEB-ONLY</strong> (Desktop/Mobile)
|
|
40
|
+
* @param {string=} options.inline See [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView). <br /><strong>WEB-ONLY</strong> (Desktop/Mobile)
|
|
41
|
+
* @param {string=} options.direction Can be one of `down`, `up`, `left` or `right`, default is `down`. <br /><strong>MOBILE-NATIVE-APP-ONLY</strong>
|
|
42
|
+
* @param {number=} options.maxScrolls The max amount of scrolls until it will stop searching for the element, default is `10`. <br /><strong>MOBILE-NATIVE-APP-ONLY</strong>
|
|
43
|
+
* @param {Element=} options.scrollableElement Element that is used to scroll within. If no element is provided it will use the following selector for iOS `-ios predicate string:type == "XCUIElementTypeApplication"` and the following for Android `//android.widget.ScrollView'`. If more elements match the default selector, then by default it will pick the first matching element. <br /> <strong>MOBILE-NATIVE-APP-ONLY</strong>
|
|
44
|
+
* @uses protocol/execute
|
|
45
|
+
* @type utility
|
|
46
|
+
*
|
|
47
|
+
*/
|
|
48
|
+
//# sourceMappingURL=scrollIntoView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrollIntoView.d.ts","sourceRoot":"","sources":["../../../src/commands/mobile/scrollIntoView.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG"}
|
package/build/context.d.ts
CHANGED
|
@@ -13,5 +13,7 @@ export declare class ContextManager {
|
|
|
13
13
|
initialize(): Promise<string>;
|
|
14
14
|
setCurrentContext(context: string): void;
|
|
15
15
|
getCurrentContext(): Promise<string>;
|
|
16
|
+
get isNativeContext(): boolean;
|
|
17
|
+
get mobileContext(): string | undefined;
|
|
16
18
|
}
|
|
17
19
|
//# sourceMappingURL=context.d.ts.map
|
package/build/context.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAIA,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,CAAC,OAAO,kBAS7D;AAED;;;;GAIG;AACH,qBAAa,cAAc;;gBAMX,OAAO,EAAE,WAAW,CAAC,OAAO;IAkFxC;;OAEG;IACG,UAAU;IAyBhB,iBAAiB,CAAE,OAAO,EAAE,MAAM;IAQ5B,iBAAiB;IAOvB,IAAI,eAAe,YAElB;IAED,IAAI,aAAa,uBAEhB;CACJ"}
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAW,YAAY,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,KAAK,KAAK,cAAc,MAAM,W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;;;;;;;GAYG;AACH,eAAO,MAAM,MAAM,WACP,YAAY,CAAC,iBAAiB,mBACrB,CAAC,MAAM,EAAE,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,YAAY,CAAC,iBAAiB,KAAK,cAAc,CAAC,MAAM,KACnH,OAAO,CAAC,WAAW,CAAC,OAAO,CAkD7B,CAAA;AAED,eAAO,MAAM,MAAM,kBAAkC,aAAa,KAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAiC/F,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,WAAW,WACZ,YAAY,CAAC,gCAAgC,2BAC7B;IAAE,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAE,KACxD,OAAO,CAAC,WAAW,CAAC,kBAAkB,CAoExC,CAAA"}
|
package/build/index.js
CHANGED
|
@@ -25,7 +25,7 @@ import { getBrowserObject } from "@wdio/utils";
|
|
|
25
25
|
var log = logger("webdriverio");
|
|
26
26
|
async function implicitWait(currentElement, commandName) {
|
|
27
27
|
const browser = getBrowserObject(currentElement);
|
|
28
|
-
const skipForMobileScroll = browser.isMobile && await browser.
|
|
28
|
+
const skipForMobileScroll = browser.isMobile && await browser.isNativeContext && commandName === "scrollIntoView";
|
|
29
29
|
if (!currentElement.elementId && !commandName.match(/(waitUntil|waitFor|isExisting|is?\w+Displayed|is?\w+Clickable)/) && !skipForMobileScroll) {
|
|
30
30
|
log.debug(
|
|
31
31
|
`command ${commandName} was called on an element ("${currentElement.selector}") that wasn't found, waiting for it...`
|
|
@@ -2976,6 +2976,27 @@ var ReferenceValue = class {
|
|
|
2976
2976
|
}
|
|
2977
2977
|
};
|
|
2978
2978
|
|
|
2979
|
+
// src/utils/mobile.ts
|
|
2980
|
+
function getNativeContext({ capabilities, isMobile }) {
|
|
2981
|
+
if (!capabilities || typeof capabilities !== "object" || !isMobile) {
|
|
2982
|
+
return false;
|
|
2983
|
+
}
|
|
2984
|
+
const isAppiumAppCapPresent = (capabilities2) => {
|
|
2985
|
+
const appiumKeys = ["app", "bundleId", "appPackage", "appActivity", "appWaitActivity", "appWaitPackage"];
|
|
2986
|
+
return appiumKeys.some((key) => capabilities2[key] !== void 0);
|
|
2987
|
+
};
|
|
2988
|
+
const isBrowserNameFalse = !!capabilities?.browserName === false;
|
|
2989
|
+
const isAutoWebviewFalse = capabilities?.autoWebview !== true;
|
|
2990
|
+
return isBrowserNameFalse && isAppiumAppCapPresent(capabilities) && isAutoWebviewFalse;
|
|
2991
|
+
}
|
|
2992
|
+
function getMobileContext({ capabilities, isAndroid, isNativeContext }) {
|
|
2993
|
+
return isNativeContext ? "NATIVE_APP" : (
|
|
2994
|
+
// Android webviews are always WEBVIEW_<package_name>, Chrome will always be CHROMIUM
|
|
2995
|
+
// We can only determine it for Android and Chrome, for all other, including iOS, we return undefined
|
|
2996
|
+
isAndroid && capabilities?.browserName?.toLowerCase() === "chrome" ? "CHROMIUM" : void 0
|
|
2997
|
+
);
|
|
2998
|
+
}
|
|
2999
|
+
|
|
2979
3000
|
// src/context.ts
|
|
2980
3001
|
var contextManager = /* @__PURE__ */ new Map();
|
|
2981
3002
|
function getContextManager(browser) {
|
|
@@ -2990,8 +3011,17 @@ function getContextManager(browser) {
|
|
|
2990
3011
|
var ContextManager = class {
|
|
2991
3012
|
#browser;
|
|
2992
3013
|
#currentContext;
|
|
3014
|
+
#mobileContext;
|
|
3015
|
+
#isNativeContext;
|
|
2993
3016
|
constructor(browser) {
|
|
2994
3017
|
this.#browser = browser;
|
|
3018
|
+
const capabilities = this.#browser.capabilities;
|
|
3019
|
+
this.#isNativeContext = getNativeContext({ capabilities, isMobile: this.#browser.isMobile });
|
|
3020
|
+
this.#mobileContext = getMobileContext({
|
|
3021
|
+
capabilities,
|
|
3022
|
+
isAndroid: this.#browser.isAndroid,
|
|
3023
|
+
isNativeContext: this.#isNativeContext
|
|
3024
|
+
});
|
|
2995
3025
|
if (!this.#isEnabled()) {
|
|
2996
3026
|
return;
|
|
2997
3027
|
}
|
|
@@ -3002,19 +3032,30 @@ var ContextManager = class {
|
|
|
3002
3032
|
if (event.command === "switchToParentFrame" || event.command === "refresh") {
|
|
3003
3033
|
this.#currentContext = void 0;
|
|
3004
3034
|
}
|
|
3035
|
+
if (this.#browser.isMobile && event.command === "switchContext") {
|
|
3036
|
+
this.#mobileContext = event.body.name;
|
|
3037
|
+
}
|
|
3005
3038
|
});
|
|
3006
3039
|
this.#browser.on("result", (event) => {
|
|
3007
3040
|
if (event.command === "closeWindow") {
|
|
3008
3041
|
this.#currentContext = event.result.value[0];
|
|
3009
3042
|
return this.#browser.switchToWindow(this.#currentContext);
|
|
3010
3043
|
}
|
|
3044
|
+
if (this.#browser.isMobile) {
|
|
3045
|
+
if (event.command === "getContext") {
|
|
3046
|
+
this.setCurrentContext(event.result.value);
|
|
3047
|
+
}
|
|
3048
|
+
if (event.command === "switchContext" && event.result.value === null && this.#mobileContext) {
|
|
3049
|
+
this.setCurrentContext(this.#mobileContext);
|
|
3050
|
+
}
|
|
3051
|
+
}
|
|
3011
3052
|
});
|
|
3012
3053
|
}
|
|
3013
3054
|
/**
|
|
3014
3055
|
* Only run this session helper if BiDi is enabled and we're not in unit tests.
|
|
3015
3056
|
*/
|
|
3016
3057
|
#isEnabled() {
|
|
3017
|
-
return !process.env.WDIO_UNIT_TESTS && this.#browser.isBidi;
|
|
3058
|
+
return !process.env.WDIO_UNIT_TESTS && (this.#browser.isBidi || this.#browser.isMobile);
|
|
3018
3059
|
}
|
|
3019
3060
|
/**
|
|
3020
3061
|
* set context at the start of the session
|
|
@@ -3023,12 +3064,20 @@ var ContextManager = class {
|
|
|
3023
3064
|
if (!this.#isEnabled()) {
|
|
3024
3065
|
return "";
|
|
3025
3066
|
}
|
|
3026
|
-
|
|
3067
|
+
if (this.#browser.isMobile && !this.#isNativeContext && !this.#mobileContext) {
|
|
3068
|
+
const context = await this.#browser.getContext();
|
|
3069
|
+
this.#mobileContext = typeof context === "string" ? context : typeof context === "object" ? context.id : void 0;
|
|
3070
|
+
}
|
|
3071
|
+
const windowHandle = this.#mobileContext || await this.#browser.getWindowHandle();
|
|
3027
3072
|
this.setCurrentContext(windowHandle);
|
|
3028
3073
|
return windowHandle;
|
|
3029
3074
|
}
|
|
3030
3075
|
setCurrentContext(context) {
|
|
3031
3076
|
this.#currentContext = context;
|
|
3077
|
+
if (this.#browser.isMobile) {
|
|
3078
|
+
this.#isNativeContext = context ? context === "NATIVE_APP" : this.#isNativeContext;
|
|
3079
|
+
this.#mobileContext = context || void 0;
|
|
3080
|
+
}
|
|
3032
3081
|
}
|
|
3033
3082
|
async getCurrentContext() {
|
|
3034
3083
|
if (!this.#currentContext) {
|
|
@@ -3036,6 +3085,12 @@ var ContextManager = class {
|
|
|
3036
3085
|
}
|
|
3037
3086
|
return this.#currentContext;
|
|
3038
3087
|
}
|
|
3088
|
+
get isNativeContext() {
|
|
3089
|
+
return this.#isNativeContext;
|
|
3090
|
+
}
|
|
3091
|
+
get mobileContext() {
|
|
3092
|
+
return this.#mobileContext;
|
|
3093
|
+
}
|
|
3039
3094
|
};
|
|
3040
3095
|
|
|
3041
3096
|
// src/polyfill.ts
|
|
@@ -3582,7 +3637,6 @@ var WebDriverInterception = class _WebDriverInterception {
|
|
|
3582
3637
|
request: request.request.request
|
|
3583
3638
|
}).catch(this.#handleNetworkProvideResponseError);
|
|
3584
3639
|
}
|
|
3585
|
-
this.#calls.push(request);
|
|
3586
3640
|
const { overwrite } = this.#respondOverwrites[0].once ? this.#respondOverwrites.shift() || {} : this.#respondOverwrites[0];
|
|
3587
3641
|
if (overwrite) {
|
|
3588
3642
|
this.#emitter.emit("overwrite", request);
|
|
@@ -6813,6 +6867,20 @@ var getPrototype = (scope) => {
|
|
|
6813
6867
|
*/
|
|
6814
6868
|
puppeteer: { value: null, writable: true }
|
|
6815
6869
|
};
|
|
6870
|
+
if (scope === "browser") {
|
|
6871
|
+
prototype.isNativeContext = {
|
|
6872
|
+
get: function() {
|
|
6873
|
+
const context = getContextManager(this);
|
|
6874
|
+
return context.isNativeContext;
|
|
6875
|
+
}
|
|
6876
|
+
};
|
|
6877
|
+
prototype.mobileContext = {
|
|
6878
|
+
get: function() {
|
|
6879
|
+
const context = getContextManager(this);
|
|
6880
|
+
return context.mobileContext;
|
|
6881
|
+
}
|
|
6882
|
+
};
|
|
6883
|
+
}
|
|
6816
6884
|
applyScopePrototype(prototype, scope);
|
|
6817
6885
|
prototype.strategies = { value: /* @__PURE__ */ new Map() };
|
|
6818
6886
|
return prototype;
|
|
@@ -7734,6 +7802,9 @@ var multiremote = async function(params, { automationProtocol } = {}) {
|
|
|
7734
7802
|
if (!isStub(automationProtocol)) {
|
|
7735
7803
|
const origAddCommand = driver.addCommand.bind(driver);
|
|
7736
7804
|
driver.addCommand = (name, fn, attachToElement) => {
|
|
7805
|
+
driver.instances.forEach(
|
|
7806
|
+
(instance) => driver.getInstance(instance).addCommand(name, fn, attachToElement)
|
|
7807
|
+
);
|
|
7737
7808
|
return origAddCommand(
|
|
7738
7809
|
name,
|
|
7739
7810
|
fn,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,MAAM,EAAe,MAAM,WAAW,CAAA;AAEpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAQvD,OAAO,EAAwB,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAE/E,OAAO,KAAK,EAAmB,QAAQ,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAOtG,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QAAG,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;KAAE;CACnE;AAiBD;;GAEG;AACH,eAAO,MAAM,YAAY,UAAW,SAAS,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../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O,EAAE,UACvB,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,YACvC,QAAQ,GAAG,gBAAgB,EAAE,GAAG,WAAW,CAAC,OAAO,EAAE,8BAExD,GAAG,EAAE,6BAwCf,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,wBAAyB,MAAM,+CAAgD,CAAA;AAElG;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,SACvB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,SACrB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,YAShC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/interception/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,WAAW,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAKhD,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC3F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAMpD,KAAK,WAAW,GAAG,MAAM,GAAG,cAAc,GAAG,MAAM,CAAA;AAOnD;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,qBAAqB;;gBAalC,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,iBAAiB,EAChC,OAAO,EAAE,WAAW,CAAC,OAAO;WAcnB,QAAQ,CACjB,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,iBAAiB,EAChC,OAAO,EAAE,WAAW,CAAC,OAAO;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/interception/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;A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AE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO;IAO5C;;OAEG;IACH,YAAY,CAAC,WAAW,EAAE,MAAM;IAIhC,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,kCAAkC,KAAK,IAAI,GAAG,qBAAqB;IAClH,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,kCAAkC,KAAK,IAAI,GAAG,qBAAqB;IAC9G,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,GAAG,qBAAqB;IACnF,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,GAAG,qBAAqB;IAC/E,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,kCAAkC,KAAK,IAAI,GAAG,qBAAqB;IAYrH,eAAe,CAAE,EACb,OAA8C,EAC9C,QAAgD,EAChD,UAAU,GACb,GAAE,cAAmB;CA2BzB;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,cAqBvD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function getNativeContext({ capabilities, isMobile }: {
|
|
2
|
+
capabilities: WebdriverIO.Capabilities;
|
|
3
|
+
isMobile: boolean;
|
|
4
|
+
}): boolean;
|
|
5
|
+
export declare function getMobileContext({ capabilities, isAndroid, isNativeContext }: {
|
|
6
|
+
capabilities: WebdriverIO.Capabilities;
|
|
7
|
+
isAndroid: boolean;
|
|
8
|
+
isNativeContext: boolean;
|
|
9
|
+
}): string | undefined;
|
|
10
|
+
//# sourceMappingURL=mobile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mobile.d.ts","sourceRoot":"","sources":["../../src/utils/mobile.ts"],"names":[],"mappings":"AAEA,wBAAgB,gBAAgB,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,EACvD;IAAE,YAAY,EAAE,WAAW,CAAC,YAAY,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,GAC9D,OAAO,CAcT;AAED,wBAAgB,gBAAgB,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,EACzE;IAAE,YAAY,EAAE,WAAW,CAAC,YAAY,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,eAAe,EAAE,OAAO,CAAA;CAAE,GACzF,MAAM,GAAG,SAAS,CAMpB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webdriverio",
|
|
3
3
|
"description": "Next-gen browser and mobile automation test framework for Node.js",
|
|
4
|
-
"version": "9.3.
|
|
4
|
+
"version": "9.3.1",
|
|
5
5
|
"homepage": "https://webdriver.io",
|
|
6
6
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"rgb2hex": "0.2.5",
|
|
101
101
|
"serialize-error": "^11.0.3",
|
|
102
102
|
"urlpattern-polyfill": "^10.0.0",
|
|
103
|
-
"webdriver": "9.3.
|
|
103
|
+
"webdriver": "9.3.1"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
106
|
"puppeteer-core": "^22.3.0"
|
|
@@ -110,5 +110,5 @@
|
|
|
110
110
|
"optional": true
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "9bc630ee3e0ca8a522896ddc2024baefaf38f6b3"
|
|
114
114
|
}
|