webdriverio 9.12.3 → 9.12.4

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.
@@ -16,7 +16,7 @@ interface BrowserSize {
16
16
  * </example>
17
17
  *
18
18
  * @alias browser.getWindowSize
19
- * @return {Object} { x, y, width, height } for W3C or { width, height } for non W3C browser
19
+ * @return {Object} `{ x, y, width, height }` for W3C or `{ width, height }` for non W3C browser
20
20
  * @type window
21
21
  *
22
22
  */
@@ -52,9 +52,7 @@ import type { NewWindowOptions } from '../../types.js';
52
52
  * @param {String=} options.windowName name of the new window
53
53
  * @param {String=} options.windowFeatures features of opened window (e.g. size, position, scrollbars, etc.)
54
54
  *
55
- * @return {Object} An object containing the window handle and the type of new window
56
- * @return {String} handle - The ID of the window handle of the new tab or window
57
- * @return {String} type - The type of the new window, either 'tab' or 'window'
55
+ * @return {Object} An object containing the window handle and the type of new window `{handle: string, type: string}` handle - The ID of the window handle of the new tab or window, type - The type of the new window, either 'tab' or 'window'
58
56
  *
59
57
  * @throws {Error} If `url` is invalid, if the command is used on mobile, or `type` is not 'tab' or 'window'.
60
58
  *
@@ -1 +1 @@
1
- {"version":3,"file":"newWindow.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/newWindow.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAMtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,wBAAsB,SAAS,CAC3B,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,GAAG,EAAE,MAAM,EACX,EAAE,IAAe,EAAE,UAAe,EAAE,cAAmB,EAAE,GAAE,gBAAqB,GACjF,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAA;CAAE,CAAC,CA2DrD"}
1
+ {"version":3,"file":"newWindow.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/newWindow.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAMtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,wBAAsB,SAAS,CAC3B,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,GAAG,EAAE,MAAM,EACX,EAAE,IAAe,EAAE,UAAe,EAAE,cAAmB,EAAE,GAAE,gBAAqB,GACjF,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAA;CAAE,CAAC,CA2DrD"}
@@ -28,7 +28,7 @@ import type { ReactSelectorOptions } from '../../types.js';
28
28
  * @param {string} selector of React component
29
29
  * @param {ReactSelectorOptions=} options React selector options
30
30
  * @param {Object=} options.props React props the element should contain
31
- * @param {Array<any>|number|string|object|boolean=} options.state React state the element should be in
31
+ * @param {`Array<any>|number|string|object|boolean`=} options.state React state the element should be in
32
32
  * @return {ElementArray}
33
33
  *
34
34
  */
@@ -38,7 +38,7 @@ import type { ReactSelectorOptions } from '../../types.js';
38
38
  * @param {string} selector of React component
39
39
  * @param {ReactSelectorOptions=} options React selector options
40
40
  * @param {Object=} options.props React props the element should contain
41
- * @param {Array<any>|number|string|object|boolean=} options.state React state the element should be in
41
+ * @param {`Array<any>|number|string|object|boolean`=} options.state React state the element should be in
42
42
  * @return {Element}
43
43
  *
44
44
  */
@@ -44,7 +44,7 @@
44
44
  * </example>
45
45
  *
46
46
  * @alias browser.reloadSession
47
- * @param newCapabilities new capabilities to create a session with
47
+ * @param {WebdriverIO.Capabilities=} newCapabilities new capabilities to create a session with
48
48
  * @type utility
49
49
  *
50
50
  */
@@ -40,7 +40,7 @@ import type { Cookie } from '@wdio/protocols';
40
40
  * </example>
41
41
  *
42
42
  * @alias browser.setCookies
43
- * @param {Array<WebDriverCookie>|WebDriverCookie} cookie cookie object or object array.
43
+ * @param {`Array<WebDriverCookie>|WebDriverCookie`} cookie cookie object or object array.
44
44
  * @param {String=} cookie.name The name of the cookie.
45
45
  * @param {String=} cookie.value The cookie value.
46
46
  * @param {String=} cookie.path The cookie path. Defaults to "/" if omitted when adding a cookie.
@@ -23,7 +23,7 @@ export interface SetViewportOptions {
23
23
  * @param {number} options.width viewport width in pixels
24
24
  * @param {number} options.height viewport height in pixels
25
25
  * @param {number} options.devicePixelRatio pixel ratio of the viewport
26
- * @return {Promise<void>}
26
+ * @return {`Promise<void>`}
27
27
  * @type window
28
28
  */
29
29
  export declare function setViewport(this: WebdriverIO.Browser, options: SetViewportOptions): Promise<void>;
@@ -14,7 +14,7 @@
14
14
  * @alias browser.setWindowSize
15
15
  * @param {number} width browser will be resized to provided width
16
16
  * @param {number} height browser will be resized to provided height
17
- * @return {Null|Object} Null for *NO*W3C browser and Object{x, y, width, height} for W3C browser
17
+ * @return {Null|Object} Null for *NO*W3C browser and Object `{x, y, width, height}` for W3C browser
18
18
  * @type window
19
19
  *
20
20
  */
@@ -53,7 +53,7 @@ import type { ChainablePromiseElement } from '../../types.js';
53
53
  *
54
54
  * @alias browser.switchFrame
55
55
  * @param {string|object|function} context
56
- * @returns {Promise<string>} the current active context id
56
+ * @returns {`Promise<string>`} the current active context id
57
57
  */
58
58
  export declare function switchFrame(this: WebdriverIO.Browser, context: WebdriverIO.Element | ChainablePromiseElement | string | null | ((tree: FlatContextTree) => boolean | Promise<boolean>)): Promise<string | void>;
59
59
  //# sourceMappingURL=switchFrame.d.ts.map
@@ -127,13 +127,13 @@ type WaitState = 'none' | 'interactive' | 'networkIdle' | 'complete';
127
127
  *
128
128
  * @param {string=} url the URL to navigate to
129
129
  * @param {UrlOptions=} options navigation options
130
- * @param {'none' | 'interactive' | 'networkIdle' | 'complete'} options.wait The desired state the requested resource should be in before finishing the command. Default: 'complete'
130
+ * @param {'none'|'interactive'|'networkIdle'|'complete'} [options.wait] The desired state the requested resource should be in before finishing the command. Default: 'complete'
131
131
  * @param {number=} options.timeout If set to a number, the command will wait for the specified amount of milliseconds for the page to load
132
132
  * all responses before returning. Default: 5000
133
133
  * @param {Function=} options.onBeforeLoad A function that is being called before your page has loaded all of its resources. It allows you to easily
134
134
  * mock the environment, e.g. overwrite Web APIs that your application uses.
135
- * @param {{user: string, pass: string}=} options.auth basic authentication credentials
136
- * @param {Record<string, string>=} options.headers headers to be sent with the request
135
+ * @param {`{user: string, pass: string}`=} options.auth basic authentication credentials
136
+ * @param {`Record<string, string>`=} options.headers headers to be sent with the request
137
137
  * @returns {WebdriverIO.Request} a request object of the page load with information about the request and response data
138
138
  *
139
139
  * @see https://w3c.github.io/webdriver/webdriver-spec.html#dfn-get
@@ -15,6 +15,6 @@ export {};
15
15
  * </example>
16
16
  *
17
17
  * @alias clock.restore
18
- * @returns { Promise<void> }
18
+ * @returns { `Promise<void>` }
19
19
  */
20
20
  //# sourceMappingURL=restore.d.ts.map
@@ -14,6 +14,6 @@ export {};
14
14
  *
15
15
  * @alias clock.setSystemTime
16
16
  * @param { Date | number } date The new date to set the system time to.
17
- * @returns { Promise<void> }
17
+ * @returns { `Promise<void>` }
18
18
  */
19
19
  //# sourceMappingURL=setSystemTime.d.ts.map
@@ -12,7 +12,7 @@
12
12
  *
13
13
  * @alias clock.tick
14
14
  * @param { number } ms The number of milliseconds to move the clock.
15
- * @returns { Promise<void> }
15
+ * @returns { `Promise<void>` }
16
16
  */
17
17
  export {};
18
18
  //# sourceMappingURL=tick.d.ts.map
@@ -22,7 +22,7 @@
22
22
  * </example>
23
23
  *
24
24
  * @alias element.addValue
25
- * @param {string | number} value value to be added
25
+ * @param {string|number} value value to be added
26
26
  *
27
27
  */
28
28
  export declare function addValue(this: WebdriverIO.Element, value: string | number): Promise<void>;
@@ -94,7 +94,7 @@ import type { ClickOptions } from '../../types.js';
94
94
  * @uses protocol/element, protocol/elementIdClick, protocol/performActions, protocol/positionClick
95
95
  * @type action
96
96
  * @param {ClickOptions=} options Click options (optional)
97
- * @param {string= | number=} options.button Can be one of `[0, "left", 1, "middle", 2, "right"]` <br /><strong>WEB-ONLY</strong> (Desktop/Mobile)
97
+ * @param {string|number=} options.button Can be one of `[0, "left", 1, "middle", 2, "right"]` <br /><strong>WEB-ONLY</strong> (Desktop/Mobile)
98
98
  * @param {number=} options.x Clicks X horizontal pixels away from location of the element (from center point of element)<br /><strong>WEB and Native</strong> (Desktop/Mobile)
99
99
  * @param {number=} options.y Clicks Y vertical pixels away from location of the element (from center point of element)<br /><strong>WEB and Native support</strong> (Desktop/Mobile)
100
100
  * @param {boolean=} options.skipRelease Boolean (optional) <br /><strong>WEB-ONLY</strong> (Desktop/Mobile)
@@ -28,7 +28,7 @@ import type { ReactSelectorOptions } from '../../types.js';
28
28
  * @param {string} selector of React component
29
29
  * @param {ReactSelectorOptions=} options React selector options
30
30
  * @param {Object=} options.props React props the element should contain
31
- * @param {Array<any>|number|string|object|boolean=} options.state React state the element should be in
31
+ * @param {`Array<any>|number|string|object|boolean`=} options.state React state the element should be in
32
32
  * @return {ElementArray}
33
33
  *
34
34
  */
@@ -38,7 +38,7 @@ import type { ReactSelectorOptions } from '../../types.js';
38
38
  * @param {string} selector of React component
39
39
  * @param {ReactSelectorOptions=} options React selector options
40
40
  * @param {Object=} options.props React props the element should contain
41
- * @param {Array<any>|number|string|object|boolean=} options.state React state the element should be in
41
+ * @param {`Array<any>|number|string|object|boolean`=} options.state React state the element should be in
42
42
  * @return {Element}
43
43
  *
44
44
  */
@@ -21,7 +21,7 @@
21
21
  * </example>
22
22
  *
23
23
  * @alias element.setValue
24
- * @param {string | number} value value to be added
24
+ * @param {string|number} value value to be added
25
25
  *
26
26
  */
27
27
  export declare function setValue(this: WebdriverIO.Element, value: string | number): Promise<void>;
@@ -13,7 +13,7 @@
13
13
  * A common example is to wait until a certain element contains a certain text (see example).
14
14
  *
15
15
  * @alias element.waitUntil
16
- * @param {Function#Boolean} condition condition to wait on
16
+ * @param {Function} condition condition to wait on
17
17
  * @param {WaitUntilOptions=} options command options
18
18
  * @param {Number=} options.timeout time in ms (default set based on [`waitforTimeout`](/docs/configuration#waitfortimeout) config value)
19
19
  * @param {String=} options.timeoutMsg error message to throw when waitUntil times out
@@ -25,8 +25,8 @@ export {};
25
25
  *
26
26
  * @alias mock.request
27
27
  * @param {MockOverwrite} overwrites payload to overwrite the response
28
- * @param {Record<string,string>} overwrites.header overwrite specific headers
29
- * @param {Record<string,string>} overwrites.cookies overwrite request cookies
28
+ * @param {`Record<string,string>`} overwrites.header overwrite specific headers
29
+ * @param {`Record<string,string>`} overwrites.cookies overwrite request cookies
30
30
  * @param {string} overwrites.method overwrite request method
31
31
  * @param {string} overwrites.url overwrite request url to initiate a redirect
32
32
  * @param {MockResponseParams=} params additional respond parameters to overwrite
@@ -25,8 +25,8 @@ export {};
25
25
  *
26
26
  * @alias mock.requestOnce
27
27
  * @param {MockOverwrite} overwrites payload to overwrite the response
28
- * @param {Record<string, string>} overwrites.header overwrite specific headers
29
- * @param {Record<string, string>} overwrites.cookies overwrite request cookies
28
+ * @param {`Record<string, string>`} overwrites.header overwrite specific headers
29
+ * @param {`Record<string, string>`} overwrites.cookies overwrite request cookies
30
30
  * @param {string} overwrites.method overwrite request method
31
31
  * @param {string} overwrites.url overwrite request url to initiate a redirect
32
32
  * @param {MockResponseParams=} params additional respond parameters to overwrite
package/build/index.js CHANGED
@@ -3372,6 +3372,7 @@ var _PolyfillManager = class _PolyfillManager extends SessionManager {
3372
3372
  __privateSet(this, _initialize, Promise.resolve(true));
3373
3373
  return;
3374
3374
  }
3375
+ __privateGet(this, _browser4).on("browsingContext.contextCreated", __privateMethod(this, _PolyfillManager_instances, registerScripts_fn).bind(this));
3375
3376
  __privateSet(this, _initialize, Promise.all([
3376
3377
  __privateGet(this, _browser4).browsingContextGetTree({}).then(({ contexts }) => {
3377
3378
  return Promise.all(contexts.map((context) => __privateMethod(this, _PolyfillManager_instances, registerScripts_fn).call(this, context)));
@@ -3380,7 +3381,6 @@ var _PolyfillManager = class _PolyfillManager extends SessionManager {
3380
3381
  events: ["browsingContext.contextCreated"]
3381
3382
  })
3382
3383
  ]).then(() => true, () => false));
3383
- __privateGet(this, _browser4).on("browsingContext.contextCreated", __privateMethod(this, _PolyfillManager_instances, registerScripts_fn).bind(this));
3384
3384
  }
3385
3385
  removeListeners() {
3386
3386
  super.removeListeners();
package/build/node.js CHANGED
@@ -3553,6 +3553,7 @@ var PolyfillManager = class _PolyfillManager extends SessionManager {
3553
3553
  this.#initialize = Promise.resolve(true);
3554
3554
  return;
3555
3555
  }
3556
+ this.#browser.on("browsingContext.contextCreated", this.#registerScripts.bind(this));
3556
3557
  this.#initialize = Promise.all([
3557
3558
  this.#browser.browsingContextGetTree({}).then(({ contexts }) => {
3558
3559
  return Promise.all(contexts.map((context) => this.#registerScripts(context)));
@@ -3561,7 +3562,6 @@ var PolyfillManager = class _PolyfillManager extends SessionManager {
3561
3562
  events: ["browsingContext.contextCreated"]
3562
3563
  })
3563
3564
  ]).then(() => true, () => false);
3564
- this.#browser.on("browsingContext.contextCreated", this.#registerScripts.bind(this));
3565
3565
  }
3566
3566
  removeListeners() {
3567
3567
  super.removeListeners();
@@ -1 +1 @@
1
- {"version":3,"file":"polyfill.d.ts","sourceRoot":"","sources":["../../src/session/polyfill.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAG7C,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,CAAC,OAAO,mBAE9D;AAID;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,YAQtB,CAAA;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,cAAc;;gBAKnC,OAAO,EAAE,WAAW,CAAC,OAAO;IA2BxC,eAAe;IAgCT,UAAU;CAGnB"}
1
+ {"version":3,"file":"polyfill.d.ts","sourceRoot":"","sources":["../../src/session/polyfill.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAG7C,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,CAAC,OAAO,mBAE9D;AAID;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,YAQtB,CAAA;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,cAAc;;gBAKnC,OAAO,EAAE,WAAW,CAAC,OAAO;IA4BxC,eAAe;IAiCT,UAAU;CAGnB"}
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.12.3",
4
+ "version": "9.12.4",
5
5
  "homepage": "https://webdriver.io",
6
6
  "author": "Christian Bromann <mail@bromann.dev>",
7
7
  "license": "MIT",
@@ -99,7 +99,7 @@
99
99
  "rgb2hex": "0.2.5",
100
100
  "serialize-error": "^11.0.3",
101
101
  "urlpattern-polyfill": "^10.0.0",
102
- "webdriver": "9.12.3"
102
+ "webdriver": "9.12.4"
103
103
  },
104
104
  "peerDependencies": {
105
105
  "puppeteer-core": "^22.3.0"
@@ -109,5 +109,5 @@
109
109
  "optional": true
110
110
  }
111
111
  },
112
- "gitHead": "1c5b2a9a4aa8f7edf9e6463805d531eef8cefd66"
112
+ "gitHead": "fb6a67317881a8d5702fa32091c15ade940dc992"
113
113
  }