webdriverio 7.16.8 → 7.16.12
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/browser/getPuppeteer.d.ts +1 -1
- package/build/commands/browser/getPuppeteer.js +1 -1
- package/build/commands/element/getProperty.d.ts +1 -1
- package/build/index.d.ts +26 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +26 -1
- package/build/scripts/getProperty.d.ts +1 -1
- package/build/utils/interception/devtools.d.ts.map +1 -1
- package/build/utils/interception/devtools.js +1 -2
- package/package.json +10 -12
|
@@ -23,7 +23,7 @@ import { Browser as PuppeteerBrowser } from 'puppeteer-core/lib/cjs/puppeteer/co
|
|
|
23
23
|
const puppeteerBrowser = await browser.getPuppeteer()
|
|
24
24
|
// switch to Puppeteer
|
|
25
25
|
const metrics = await browser.call(async () => {
|
|
26
|
-
|
|
26
|
+
const pages = await puppeteerBrowser.pages()
|
|
27
27
|
pages[0].setGeolocation({ latitude: 59.95, longitude: 30.31667 })
|
|
28
28
|
return pages[0].metrics()
|
|
29
29
|
})
|
|
@@ -31,7 +31,7 @@ const log = (0, logger_1.default)('webdriverio');
|
|
|
31
31
|
const puppeteerBrowser = await browser.getPuppeteer()
|
|
32
32
|
// switch to Puppeteer
|
|
33
33
|
const metrics = await browser.call(async () => {
|
|
34
|
-
|
|
34
|
+
const pages = await puppeteerBrowser.pages()
|
|
35
35
|
pages[0].setGeolocation({ latitude: 59.95, longitude: 30.31667 })
|
|
36
36
|
return pages[0].metrics()
|
|
37
37
|
})
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* @param {String} property name of the element property
|
|
15
15
|
* @return {Object|String|Boolean|Number|null} the value of the property of the selected element
|
|
16
16
|
*/
|
|
17
|
-
export default function getProperty(this: WebdriverIO.Element, property: string): Promise<string | number | boolean | HTMLElement | Element | ChildNode | ParentNode | (() => DOMRect) | Document | ((event: Event) => boolean) | ((this: GlobalEventHandlers, ev: UIEvent) => any) | ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: FocusEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | OnErrorEventHandler | ((this: GlobalEventHandlers, ev: FocusEvent) => any) | ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: UIEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev:
|
|
17
|
+
export default function getProperty(this: WebdriverIO.Element, property: string): Promise<string | number | boolean | HTMLElement | Element | ChildNode | ParentNode | (() => DOMRect) | Document | ((event: Event) => boolean) | ((this: GlobalEventHandlers, ev: UIEvent) => any) | ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: FocusEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | OnErrorEventHandler | ((this: GlobalEventHandlers, ev: FocusEvent) => any) | ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: UIEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: TouchEvent) => any) | ((this: GlobalEventHandlers, ev: TouchEvent) => any) | ((this: GlobalEventHandlers, ev: TouchEvent) => any) | ((this: GlobalEventHandlers, ev: TouchEvent) => any) | ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: WheelEvent) => any) | (() => ElementInternals) | (() => void) | {
|
|
18
18
|
<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
19
19
|
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
20
20
|
} | {
|
package/build/index.d.ts
CHANGED
|
@@ -3,14 +3,39 @@ import SevereServiceErrorImport from './utils/SevereServiceError';
|
|
|
3
3
|
import type { AttachOptions } from './types';
|
|
4
4
|
export declare type RemoteOptions = Options.WebdriverIO & Omit<Options.Testrunner, 'capabilities'>;
|
|
5
5
|
/**
|
|
6
|
-
* A method to create a new session with WebdriverIO
|
|
6
|
+
* A method to create a new session with WebdriverIO.
|
|
7
|
+
*
|
|
8
|
+
* <b>
|
|
9
|
+
* NOTE: If you hit "error TS2694: Namespace 'global.WebdriverIO' has no exported member 'Browser'" when using typescript,
|
|
10
|
+
* add "webdriverio/async" into tsconfig.json's "types" array will solve it: <code> { "compilerOptions": { "types": ["webdriverio/async"] } } </code>
|
|
11
|
+
* </b>
|
|
7
12
|
*
|
|
8
13
|
* @param {Object} [params={}] Options to create the session with
|
|
9
14
|
* @param {function} remoteModifier Modifier function to change the monad object
|
|
10
15
|
* @return {object} browser object with sessionId
|
|
16
|
+
* @see <a href="https://webdriver.io/docs/typescript">Typescript setup</a>
|
|
11
17
|
*/
|
|
12
18
|
export declare const remote: (params: RemoteOptions, remoteModifier?: Function | undefined) => Promise<WebdriverIO.Browser>;
|
|
13
19
|
export declare const attach: (attachOptions: AttachOptions) => Promise<WebdriverIO.Browser>;
|
|
20
|
+
/**
|
|
21
|
+
* WebdriverIO allows you to run multiple automated sessions in a single test.
|
|
22
|
+
* This is handy when you’re testing features that require multiple users (for example, chat or WebRTC applications).
|
|
23
|
+
*
|
|
24
|
+
* Instead of creating a couple of remote instances where you need to execute common commands like newSession() or url() on each instance,
|
|
25
|
+
* you can simply create a multiremote instance and control all browsers at the same time.
|
|
26
|
+
*
|
|
27
|
+
* <b>
|
|
28
|
+
* NOTE: Multiremote is not meant to execute all your tests in parallel.
|
|
29
|
+
* It is intended to help coordinate multiple browsers and/or mobile devices for special integration tests (e.g. chat applications).
|
|
30
|
+
* </b>
|
|
31
|
+
*
|
|
32
|
+
* @param params capabilities to choose desired devices.
|
|
33
|
+
* @param automationProtocol
|
|
34
|
+
* @return All remote instances, the first result represents the capability defined first in the capability object,
|
|
35
|
+
* the second result the second capability and so on.
|
|
36
|
+
*
|
|
37
|
+
* @see <a href="https://webdriver.io/docs/multiremote">External document and example usage</a>.
|
|
38
|
+
*/
|
|
14
39
|
export declare const multiremote: (params: Capabilities.MultiRemoteCapabilities, { automationProtocol }?: {
|
|
15
40
|
automationProtocol?: string | undefined;
|
|
16
41
|
}) => Promise<WebdriverIO.MultiRemoteBrowser>;
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAKnD,OAAO,wBAAwB,MAAM,4BAA4B,CAAA;AAOjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,oBAAY,aAAa,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC,CAAA;AAE1F
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAKnD,OAAO,wBAAwB,MAAM,4BAA4B,CAAA;AAOjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,oBAAY,aAAa,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC,CAAA;AAE1F;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,MAAM,WAA2B,aAAa,4CAA8B,QAAQ,YAAY,OAAO,CA+CnH,CAAA;AAED,eAAO,MAAM,MAAM,kBAAkC,aAAa,KAAG,QAAQ,YAAY,OAAO,CAmB/F,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,WAAW,WACZ,aAAa,uBAAuB;;MAE7C,QAAQ,YAAY,kBAAkB,CAgExC,CAAA;AAED,eAAO,MAAM,kBAAkB,iCAA2B,CAAA;AAC1D,cAAc,SAAS,CAAA;AACvB,cAAc,4BAA4B,CAAA"}
|
package/build/index.js
CHANGED
|
@@ -37,11 +37,17 @@ const detectBackend_1 = __importDefault(require("./utils/detectBackend"));
|
|
|
37
37
|
const constants_1 = require("./constants");
|
|
38
38
|
const utils_2 = require("./utils");
|
|
39
39
|
/**
|
|
40
|
-
* A method to create a new session with WebdriverIO
|
|
40
|
+
* A method to create a new session with WebdriverIO.
|
|
41
|
+
*
|
|
42
|
+
* <b>
|
|
43
|
+
* NOTE: If you hit "error TS2694: Namespace 'global.WebdriverIO' has no exported member 'Browser'" when using typescript,
|
|
44
|
+
* add "webdriverio/async" into tsconfig.json's "types" array will solve it: <code> { "compilerOptions": { "types": ["webdriverio/async"] } } </code>
|
|
45
|
+
* </b>
|
|
41
46
|
*
|
|
42
47
|
* @param {Object} [params={}] Options to create the session with
|
|
43
48
|
* @param {function} remoteModifier Modifier function to change the monad object
|
|
44
49
|
* @return {object} browser object with sessionId
|
|
50
|
+
* @see <a href="https://webdriver.io/docs/typescript">Typescript setup</a>
|
|
45
51
|
*/
|
|
46
52
|
const remote = async function (params, remoteModifier) {
|
|
47
53
|
logger_1.default.setLogLevelsConfig(params.logLevels, params.logLevel);
|
|
@@ -100,6 +106,25 @@ const attach = async function (attachOptions) {
|
|
|
100
106
|
return ProtocolDriver.attachToSession(params, undefined, prototype, utils_1.wrapCommand);
|
|
101
107
|
};
|
|
102
108
|
exports.attach = attach;
|
|
109
|
+
/**
|
|
110
|
+
* WebdriverIO allows you to run multiple automated sessions in a single test.
|
|
111
|
+
* This is handy when you’re testing features that require multiple users (for example, chat or WebRTC applications).
|
|
112
|
+
*
|
|
113
|
+
* Instead of creating a couple of remote instances where you need to execute common commands like newSession() or url() on each instance,
|
|
114
|
+
* you can simply create a multiremote instance and control all browsers at the same time.
|
|
115
|
+
*
|
|
116
|
+
* <b>
|
|
117
|
+
* NOTE: Multiremote is not meant to execute all your tests in parallel.
|
|
118
|
+
* It is intended to help coordinate multiple browsers and/or mobile devices for special integration tests (e.g. chat applications).
|
|
119
|
+
* </b>
|
|
120
|
+
*
|
|
121
|
+
* @param params capabilities to choose desired devices.
|
|
122
|
+
* @param automationProtocol
|
|
123
|
+
* @return All remote instances, the first result represents the capability defined first in the capability object,
|
|
124
|
+
* the second result the second capability and so on.
|
|
125
|
+
*
|
|
126
|
+
* @see <a href="https://webdriver.io/docs/multiremote">External document and example usage</a>.
|
|
127
|
+
*/
|
|
103
128
|
const multiremote = async function (params, { automationProtocol } = {}) {
|
|
104
129
|
const multibrowser = new multiremote_1.default();
|
|
105
130
|
const browserNames = Object.keys(params);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @param {String} property requested property
|
|
5
5
|
* @return {String} the value of the property
|
|
6
6
|
*/
|
|
7
|
-
export default function getProperty(element: HTMLElement, property: keyof HTMLElement): string | number | boolean | HTMLElement | Element | ChildNode | ParentNode | (() => DOMRect) | Document | ((event: Event) => boolean) | ((this: GlobalEventHandlers, ev: UIEvent) => any) | ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: FocusEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | OnErrorEventHandler | ((this: GlobalEventHandlers, ev: FocusEvent) => any) | ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: UIEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev:
|
|
7
|
+
export default function getProperty(element: HTMLElement, property: keyof HTMLElement): string | number | boolean | HTMLElement | Element | ChildNode | ParentNode | (() => DOMRect) | Document | ((event: Event) => boolean) | ((this: GlobalEventHandlers, ev: UIEvent) => any) | ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: FocusEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: DragEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | OnErrorEventHandler | ((this: GlobalEventHandlers, ev: FocusEvent) => any) | ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | ((this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: UIEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: TouchEvent) => any) | ((this: GlobalEventHandlers, ev: TouchEvent) => any) | ((this: GlobalEventHandlers, ev: TouchEvent) => any) | ((this: GlobalEventHandlers, ev: TouchEvent) => any) | ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: Event) => any) | ((this: GlobalEventHandlers, ev: WheelEvent) => any) | (() => ElementInternals) | (() => void) | {
|
|
8
8
|
<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
9
9
|
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
10
10
|
} | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devtools.d.ts","sourceRoot":"","sources":["../../../src/utils/interception/devtools.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"devtools.d.ts","sourceRoot":"","sources":["../../../src/utils/interception/devtools.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oDAAoD,CAAA;AACpF,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAA;AAG7C,OAAO,YAAY,MAAM,GAAG,CAAA;AAC5B,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAMzE,aAAK,cAAc,GAAG;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,UAAU,WAAW;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,aAAK,KAAK,GAAG;IACT,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,OAAO,GAAG;QAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IACtD,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,eAAe,EAAE,WAAW,EAAE,CAAA;CACjC,CAAA;AAID,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,YAAY;IAC1D,MAAM,CAAC,yBAAyB,CAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,IAAI,GAAG,cAAc,CAAC;IA8IjI;;OAEG;IACH,IAAI,KAAK,cAER;IAED;;OAEG;IACH,KAAK;IAIL;;;OAGG;IACH,OAAO;IAKP;;;;OAIG;IACH,OAAO,CAAE,SAAS,EAAE,aAAa,EAAE,MAAM,GAAE,kBAAuB;IAIlE;;;;OAIG;IACH,WAAW,CAAE,SAAS,EAAE,aAAa,EAAE,MAAM,GAAE,kBAAuB;IAItE;;;OAGG;IACH,KAAK,CAAE,WAAW,EAAE,QAAQ,CAAC,OAAO,CAAC,WAAW,EAAE,MAAM,GAAE,OAAc;IAOxE;;;OAGG;IACH,SAAS,CAAE,WAAW,EAAE,QAAQ,CAAC,OAAO,CAAC,WAAW;CAGvD"}
|
|
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const atob_1 = __importDefault(require("atob"));
|
|
9
8
|
const logger_1 = __importDefault(require("@wdio/logger"));
|
|
10
9
|
const _1 = __importDefault(require("."));
|
|
11
10
|
const __1 = require("..");
|
|
@@ -56,7 +55,7 @@ class DevtoolsInterception extends _1.default {
|
|
|
56
55
|
continue;
|
|
57
56
|
}
|
|
58
57
|
const { body, base64Encoded = undefined } = isRequest ? { body: '' } : await client.send('Fetch.getResponseBody', { requestId }).catch(/* istanbul ignore next */ () => ({}));
|
|
59
|
-
request.body = base64Encoded ? (
|
|
58
|
+
request.body = base64Encoded ? Buffer.from(body, 'base64').toString('utf8') : body;
|
|
60
59
|
const contentTypeHeader = Object.keys(responseHeaders).find(h => h.toLowerCase() === 'content-type') || '';
|
|
61
60
|
const responseContentType = responseHeaders[contentTypeHeader];
|
|
62
61
|
request.body = responseContentType && responseContentType.includes('application/json')
|
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": "7.16.
|
|
4
|
+
"version": "7.16.12",
|
|
5
5
|
"homepage": "https://webdriver.io",
|
|
6
6
|
"author": "Christian Bromann <christian@saucelabs.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -48,7 +48,6 @@
|
|
|
48
48
|
"typeScriptVersion": "3.8.3",
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/archiver": "^5.1.0",
|
|
51
|
-
"@types/atob": "^2.1.2",
|
|
52
51
|
"@types/fs-extra": "^9.0.2",
|
|
53
52
|
"@types/lodash.clonedeep": "^4.5.6",
|
|
54
53
|
"@types/lodash.isobject": "^3.0.6",
|
|
@@ -58,19 +57,18 @@
|
|
|
58
57
|
"dependencies": {
|
|
59
58
|
"@types/aria-query": "^5.0.0",
|
|
60
59
|
"@types/node": "^16.11.1",
|
|
61
|
-
"@wdio/config": "7.16.
|
|
60
|
+
"@wdio/config": "7.16.11",
|
|
62
61
|
"@wdio/logger": "7.16.0",
|
|
63
62
|
"@wdio/protocols": "7.16.7",
|
|
64
|
-
"@wdio/repl": "7.16.
|
|
65
|
-
"@wdio/types": "7.16.
|
|
66
|
-
"@wdio/utils": "7.16.
|
|
63
|
+
"@wdio/repl": "7.16.11",
|
|
64
|
+
"@wdio/types": "7.16.11",
|
|
65
|
+
"@wdio/utils": "7.16.11",
|
|
67
66
|
"archiver": "^5.0.0",
|
|
68
67
|
"aria-query": "^5.0.0",
|
|
69
|
-
"atob": "^2.1.2",
|
|
70
68
|
"css-shorthand-properties": "^1.1.1",
|
|
71
69
|
"css-value": "^0.0.1",
|
|
72
|
-
"devtools": "7.16.
|
|
73
|
-
"devtools-protocol": "^0.0.
|
|
70
|
+
"devtools": "7.16.12",
|
|
71
|
+
"devtools-protocol": "^0.0.948846",
|
|
74
72
|
"fs-extra": "^10.0.0",
|
|
75
73
|
"get-port": "^5.1.1",
|
|
76
74
|
"grapheme-splitter": "^1.0.2",
|
|
@@ -79,12 +77,12 @@
|
|
|
79
77
|
"lodash.isplainobject": "^4.0.6",
|
|
80
78
|
"lodash.zip": "^4.2.0",
|
|
81
79
|
"minimatch": "^3.0.4",
|
|
82
|
-
"puppeteer-core": "^
|
|
80
|
+
"puppeteer-core": "^13.0.0",
|
|
83
81
|
"query-selector-shadow-dom": "^1.0.0",
|
|
84
82
|
"resq": "^1.9.1",
|
|
85
83
|
"rgb2hex": "0.2.5",
|
|
86
84
|
"serialize-error": "^8.0.0",
|
|
87
|
-
"webdriver": "7.16.
|
|
85
|
+
"webdriver": "7.16.11"
|
|
88
86
|
},
|
|
89
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "18b8916ea2bfed56f20f1926099286618b7f8ffc"
|
|
90
88
|
}
|