webdriverio 8.8.2 → 8.8.6

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.
Files changed (55) hide show
  1. package/build/commands/browser/addCommand.d.ts +1 -1
  2. package/build/commands/browser/addCommand.js +1 -1
  3. package/build/commands/browser/custom$$.d.ts +2 -2
  4. package/build/commands/browser/custom$$.js +2 -2
  5. package/build/commands/browser/custom$.d.ts +2 -2
  6. package/build/commands/browser/custom$.js +2 -2
  7. package/build/commands/browser/newWindow.d.ts +1 -1
  8. package/build/commands/browser/newWindow.js +1 -1
  9. package/build/commands/browser/overwriteCommand.d.ts +1 -1
  10. package/build/commands/browser/overwriteCommand.js +1 -1
  11. package/build/commands/browser/pause.d.ts +1 -1
  12. package/build/commands/browser/pause.js +1 -1
  13. package/build/commands/browser/react$$.d.ts +1 -1
  14. package/build/commands/browser/react$$.js +1 -1
  15. package/build/commands/browser/react$.d.ts +1 -1
  16. package/build/commands/browser/react$.js +1 -1
  17. package/build/commands/browser/setWindowSize.d.ts +2 -2
  18. package/build/commands/browser/setWindowSize.js +2 -2
  19. package/build/commands/browser/throttle.js +4 -4
  20. package/build/commands/browser/uploadFile.d.ts +1 -1
  21. package/build/commands/browser/uploadFile.js +1 -1
  22. package/build/commands/element/custom$$.d.ts +2 -2
  23. package/build/commands/element/custom$$.js +2 -2
  24. package/build/commands/element/custom$.d.ts +2 -2
  25. package/build/commands/element/custom$.js +2 -2
  26. package/build/commands/element/getAttribute.d.ts +1 -1
  27. package/build/commands/element/getAttribute.js +1 -1
  28. package/build/commands/element/getCSSProperty.d.ts +1 -1
  29. package/build/commands/element/getCSSProperty.js +1 -1
  30. package/build/commands/element/getLocation.js +1 -1
  31. package/build/commands/element/getProperty.d.ts +1 -1
  32. package/build/commands/element/getProperty.js +1 -1
  33. package/build/commands/element/react$$.d.ts +1 -1
  34. package/build/commands/element/react$$.js +1 -1
  35. package/build/commands/element/react$.d.ts +1 -1
  36. package/build/commands/element/react$.js +1 -1
  37. package/build/commands/element/scrollIntoView.d.ts.map +1 -1
  38. package/build/commands/element/scrollIntoView.js +20 -4
  39. package/build/commands/element/selectByAttribute.d.ts +1 -1
  40. package/build/commands/element/selectByAttribute.js +1 -1
  41. package/build/commands/element/selectByIndex.d.ts +1 -1
  42. package/build/commands/element/selectByIndex.js +1 -1
  43. package/build/scripts/getHTML.d.ts +1 -1
  44. package/build/scripts/getHTML.js +1 -1
  45. package/build/scripts/getProperty.d.ts +2 -2
  46. package/build/scripts/getProperty.js +2 -2
  47. package/build/scripts/newWindow.d.ts +3 -3
  48. package/build/scripts/newWindow.js +3 -3
  49. package/build/utils/Timer.d.ts +3 -3
  50. package/build/utils/Timer.js +3 -3
  51. package/build/utils/getElementObject.d.ts +2 -2
  52. package/build/utils/getElementObject.js +2 -2
  53. package/build/utils/index.d.ts +1 -1
  54. package/build/utils/index.js +1 -1
  55. package/package.json +9 -9
@@ -28,7 +28,7 @@
28
28
  })
29
29
  * </example>
30
30
  * @alias browser.addCommand
31
- * @param {String} name name of the custom command
31
+ * @param {string} name name of the custom command
32
32
  * @param {Function} callback function to be called
33
33
  * @param {Boolean=} elementScope extend the Element object instead of the Browser object
34
34
  * @type utility
@@ -29,7 +29,7 @@
29
29
  })
30
30
  * </example>
31
31
  * @alias browser.addCommand
32
- * @param {String} name name of the custom command
32
+ * @param {string} name name of the custom command
33
33
  * @param {Function} callback function to be called
34
34
  * @param {Boolean=} elementScope extend the Element object instead of the Browser object
35
35
  * @type utility
@@ -18,8 +18,8 @@ import type { ElementArray } from '../../types.js';
18
18
  * </example>
19
19
  *
20
20
  * @alias custom$$
21
- * @param {String} strategyName
22
- * @param {Any} strategyArguments
21
+ * @param {string} strategyName
22
+ * @param {*} strategyArguments
23
23
  * @return {ElementArray}
24
24
  */
25
25
  export declare function custom$$(this: WebdriverIO.Browser, strategyName: string, ...strategyArguments: any[]): Promise<ElementArray>;
@@ -20,8 +20,8 @@ import { ELEMENT_KEY } from '../../constants.js';
20
20
  * </example>
21
21
  *
22
22
  * @alias custom$$
23
- * @param {String} strategyName
24
- * @param {Any} strategyArguments
23
+ * @param {string} strategyName
24
+ * @param {*} strategyArguments
25
25
  * @return {ElementArray}
26
26
  */
27
27
  export async function custom$$(strategyName, ...strategyArguments) {
@@ -17,8 +17,8 @@
17
17
  * </example>
18
18
  *
19
19
  * @alias custom$
20
- * @param {String} strategyName
21
- * @param {Any} strategyArguments
20
+ * @param {string} strategyName
21
+ * @param {*} strategyArguments
22
22
  * @return {Element}
23
23
  */
24
24
  export declare function custom$(this: WebdriverIO.Browser, strategyName: string, ...strategyArguments: any[]): Promise<WebdriverIO.Element>;
@@ -19,8 +19,8 @@ import { ELEMENT_KEY } from '../../constants.js';
19
19
  * </example>
20
20
  *
21
21
  * @alias custom$
22
- * @param {String} strategyName
23
- * @param {Any} strategyArguments
22
+ * @param {string} strategyName
23
+ * @param {*} strategyArguments
24
24
  * @return {Element}
25
25
  */
26
26
  export async function custom$(strategyName, ...strategyArguments) {
@@ -26,7 +26,7 @@ import type { NewWindowOptions } from '../../types.js';
26
26
  });
27
27
  * </example>
28
28
  *
29
- * @param {String} url website URL to open
29
+ * @param {string} url website URL to open
30
30
  * @param {NewWindowOptions=} options newWindow command options
31
31
  * @param {String=} options.windowName name of the new window
32
32
  * @param {String=} options.windowFeatures features of opened window (e.g. size, position, scrollbars, etc.)
@@ -28,7 +28,7 @@ const WAIT_FOR_NEW_HANDLE_TIMEOUT = 3000;
28
28
  });
29
29
  * </example>
30
30
  *
31
- * @param {String} url website URL to open
31
+ * @param {string} url website URL to open
32
32
  * @param {NewWindowOptions=} options newWindow command options
33
33
  * @param {String=} options.windowName name of the new window
34
34
  * @param {String=} options.windowFeatures features of opened window (e.g. size, position, scrollbars, etc.)
@@ -23,7 +23,7 @@
23
23
  })
24
24
  * </example>
25
25
  * @alias browser.overwriteCommand
26
- * @param {String} name name of the original command
26
+ * @param {string} name name of the original command
27
27
  * @param {Function} callback pass original function
28
28
  * @param {Boolean=} elementScope extend the Element object instead of the Browser object
29
29
  * @type utility
@@ -24,7 +24,7 @@
24
24
  })
25
25
  * </example>
26
26
  * @alias browser.overwriteCommand
27
- * @param {String} name name of the original command
27
+ * @param {string} name name of the original command
28
28
  * @param {Function} callback pass original function
29
29
  * @param {Boolean=} elementScope extend the Element object instead of the Browser object
30
30
  * @type utility
@@ -15,7 +15,7 @@
15
15
  * </example>
16
16
  *
17
17
  * @alias browser.pause
18
- * @param {Number} milliseconds time in ms
18
+ * @param {number} milliseconds time in ms
19
19
  * @type utility
20
20
  *
21
21
  */
@@ -15,7 +15,7 @@
15
15
  * </example>
16
16
  *
17
17
  * @alias browser.pause
18
- * @param {Number} milliseconds time in ms
18
+ * @param {number} milliseconds time in ms
19
19
  * @type utility
20
20
  *
21
21
  */
@@ -25,7 +25,7 @@ import type { ReactSelectorOptions, ElementArray } from '../../types.js';
25
25
  * </example>
26
26
  *
27
27
  * @alias browser.react$$
28
- * @param {String} selector of React component
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
31
  * @param {Array<any>|number|string|object|boolean=} options.state React state the element should be in
@@ -31,7 +31,7 @@ let resqScript;
31
31
  * </example>
32
32
  *
33
33
  * @alias browser.react$$
34
- * @param {String} selector of React component
34
+ * @param {string} selector of React component
35
35
  * @param {ReactSelectorOptions=} options React selector options
36
36
  * @param {Object=} options.props React props the element should contain
37
37
  * @param {Array<any>|number|string|object|boolean=} options.state React state the element should be in
@@ -35,7 +35,7 @@ import type { ReactSelectorOptions } from '../../types.js';
35
35
  * </example>
36
36
  *
37
37
  * @alias browser.react$
38
- * @param {String} selector of React component
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
41
  * @param {Array<any>|number|string|object|boolean=} options.state React state the element should be in
@@ -40,7 +40,7 @@ let resqScript;
40
40
  * </example>
41
41
  *
42
42
  * @alias browser.react$
43
- * @param {String} selector of React component
43
+ * @param {string} selector of React component
44
44
  * @param {ReactSelectorOptions=} options React selector options
45
45
  * @param {Object=} options.props React props the element should contain
46
46
  * @param {Array<any>|number|string|object|boolean=} options.state React state the element should be in
@@ -10,8 +10,8 @@
10
10
  * </example>
11
11
  *
12
12
  * @alias browser.setWindowSize
13
- * @param {Number} width browser will be resized to provided width
14
- * @param {Number} height browser will be resized to provided height
13
+ * @param {number} width browser will be resized to provided width
14
+ * @param {number} height browser will be resized to provided height
15
15
  * @return {Null|Object} Null for *NO*W3C browser and Object{x, y, width, height} for W3C browser
16
16
  * @type window
17
17
  *
@@ -13,8 +13,8 @@ const maxWindowSize = Number.MAX_SAFE_INTEGER;
13
13
  * </example>
14
14
  *
15
15
  * @alias browser.setWindowSize
16
- * @param {Number} width browser will be resized to provided width
17
- * @param {Number} height browser will be resized to provided height
16
+ * @param {number} width browser will be resized to provided width
17
+ * @param {number} height browser will be resized to provided height
18
18
  * @return {Null|Object} Null for *NO*W3C browser and Object{x, y, width, height} for W3C browser
19
19
  * @type window
20
20
  *
@@ -35,10 +35,10 @@
35
35
  *
36
36
  * @alias browser.throttle
37
37
  * @param {ThrottleOptions} params parameters for throttling
38
- * @param {Boolean} params.offline True to emulate internet disconnection.
39
- * @param {Number} params.latency Minimum latency from request sent to response headers received (ms).
40
- * @param {Number} params.downloadThroughput Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
41
- * @param {Number} params.uploadThroughput Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
38
+ * @param {boolean} params.offline True to emulate internet disconnection.
39
+ * @param {number} params.latency Minimum latency from request sent to response headers received (ms).
40
+ * @param {number} params.downloadThroughput Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
41
+ * @param {number} params.uploadThroughput Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
42
42
  * @type utility
43
43
  *
44
44
  */
@@ -23,7 +23,7 @@
23
23
  * </example>
24
24
  *
25
25
  * @alias browser.uploadFile
26
- * @param {String} localPath local path to file
26
+ * @param {string} localPath local path to file
27
27
  * @type utility
28
28
  * @uses protocol/file
29
29
  * @return {String} remote URL
@@ -26,7 +26,7 @@ import archiver from 'archiver';
26
26
  * </example>
27
27
  *
28
28
  * @alias browser.uploadFile
29
- * @param {String} localPath local path to file
29
+ * @param {string} localPath local path to file
30
30
  * @type utility
31
31
  * @uses protocol/file
32
32
  * @return {String} remote URL
@@ -19,8 +19,8 @@ import type { ElementArray } from '../../types.js';
19
19
  * </example>
20
20
  *
21
21
  * @alias custom$$
22
- * @param {String} strategyName
23
- * @param {Any} strategyArguments
22
+ * @param {string} strategyName
23
+ * @param {*} strategyArguments
24
24
  * @return {ElementArray}
25
25
  */
26
26
  export declare function custom$$(this: WebdriverIO.Element, strategyName: string, ...strategyArguments: any[]): Promise<ElementArray>;
@@ -21,8 +21,8 @@ import { ELEMENT_KEY } from '../../constants.js';
21
21
  * </example>
22
22
  *
23
23
  * @alias custom$$
24
- * @param {String} strategyName
25
- * @param {Any} strategyArguments
24
+ * @param {string} strategyName
25
+ * @param {*} strategyArguments
26
26
  * @return {ElementArray}
27
27
  */
28
28
  export async function custom$$(strategyName, ...strategyArguments) {
@@ -18,8 +18,8 @@
18
18
  * </example>
19
19
  *
20
20
  * @alias custom$
21
- * @param {String} strategyName
22
- * @param {Any} strategyArguments
21
+ * @param {string} strategyName
22
+ * @param {*} strategyArguments
23
23
  * @return {Element}
24
24
  */
25
25
  export declare function custom$(this: WebdriverIO.Element, strategyName: string, ...strategyArguments: any[]): Promise<WebdriverIO.Element>;
@@ -21,8 +21,8 @@ import { ELEMENT_KEY } from '../../constants.js';
21
21
  * </example>
22
22
  *
23
23
  * @alias custom$
24
- * @param {String} strategyName
25
- * @param {Any} strategyArguments
24
+ * @param {string} strategyName
25
+ * @param {*} strategyArguments
26
26
  * @return {Element}
27
27
  */
28
28
  export async function custom$(strategyName, ...strategyArguments) {
@@ -18,7 +18,7 @@
18
18
  * </example>
19
19
  *
20
20
  * @alias element.getAttribute
21
- * @param {String} attributeName requested attribute
21
+ * @param {string} attributeName requested attribute
22
22
  * @return {String|null} The value of the attribute, or null if it is not set on the element.
23
23
  * @uses protocol/elements, protocol/elementIdAttribute
24
24
  * @type property
@@ -18,7 +18,7 @@
18
18
  * </example>
19
19
  *
20
20
  * @alias element.getAttribute
21
- * @param {String} attributeName requested attribute
21
+ * @param {string} attributeName requested attribute
22
22
  * @return {String|null} The value of the attribute, or null if it is not set on the element.
23
23
  * @uses protocol/elements, protocol/elementIdAttribute
24
24
  * @type property
@@ -63,7 +63,7 @@
63
63
  * </example>
64
64
  *
65
65
  * @alias element.getCSSProperty
66
- * @param {String} cssProperty css property name
66
+ * @param {string} cssProperty css property name
67
67
  * @return {CSSProperty} The specified css of the element
68
68
  *
69
69
  */
@@ -65,7 +65,7 @@ import { parseCSS } from '../../utils/index.js';
65
65
  * </example>
66
66
  *
67
67
  * @alias element.getCSSProperty
68
- * @param {String} cssProperty css property name
68
+ * @param {string} cssProperty css property name
69
69
  * @return {CSSProperty} The specified css of the element
70
70
  *
71
71
  */
@@ -21,7 +21,7 @@ import { getElementRect } from '../../utils/index.js';
21
21
  * </example>
22
22
  *
23
23
  * @alias element.getLocation
24
- * @param {String} prop can be "x" or "y" to get a result value directly for easier assertions
24
+ * @param {string} prop can be "x" or "y" to get a result value directly for easier assertions
25
25
  * @return {Object|Number} The X and Y coordinates for the element on the page (`{x:number, y:number}`)
26
26
  * @uses protocol/elementIdLocation
27
27
  * @type property
@@ -11,7 +11,7 @@
11
11
  * </example>
12
12
  *
13
13
  * @alias element.getProperty
14
- * @param {String} property name of the element property
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
17
  export declare function getProperty(this: WebdriverIO.Element, property: string): Promise<string | number | boolean | HTMLElement | Element | ChildNode | ParentNode | (() => ElementInternals) | (() => void) | {
@@ -13,7 +13,7 @@ import getPropertyScript from '../../scripts/getProperty.js';
13
13
  * </example>
14
14
  *
15
15
  * @alias element.getProperty
16
- * @param {String} property name of the element property
16
+ * @param {string} property name of the element property
17
17
  * @return {Object|String|Boolean|Number|null} the value of the property of the selected element
18
18
  */
19
19
  export function getProperty(property) {
@@ -25,7 +25,7 @@ import type { ReactSelectorOptions } from '../../types.js';
25
25
  * </example>
26
26
  *
27
27
  * @alias react$$
28
- * @param {String} selector of React component
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
31
  * @param {Array<any>|number|string|object|boolean=} options.state React state the element should be in
@@ -31,7 +31,7 @@ let resqScript;
31
31
  * </example>
32
32
  *
33
33
  * @alias react$$
34
- * @param {String} selector of React component
34
+ * @param {string} selector of React component
35
35
  * @param {ReactSelectorOptions=} options React selector options
36
36
  * @param {Object=} options.props React props the element should contain
37
37
  * @param {Array<any>|number|string|object|boolean=} options.state React state the element should be in
@@ -35,7 +35,7 @@ import type { ReactSelectorOptions } from '../../types.js';
35
35
  * </example>
36
36
  *
37
37
  * @alias react$
38
- * @param {String} selector of React component
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
41
  * @param {Array<any>|number|string|object|boolean=} options.state React state the element should be in
@@ -41,7 +41,7 @@ let resqScript;
41
41
  * </example>
42
42
  *
43
43
  * @alias react$
44
- * @param {String} selector of React component
44
+ * @param {string} selector of React component
45
45
  * @param {ReactSelectorOptions=} options React selector options
46
46
  * @param {Object=} options.props React props the element should contain
47
47
  * @param {Array<any>|number|string|object|boolean=} options.state React state the element should be in
@@ -1 +1 @@
1
- {"version":3,"file":"scrollIntoView.d.ts","sourceRoot":"","sources":["../../../src/commands/element/scrollIntoView.ts"],"names":[],"mappings":"AAsBA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,cAAc,CAChC,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,OAAO,GAAE,qBAAqB,GAAG,OAA+C,iBAsDnF"}
1
+ {"version":3,"file":"scrollIntoView.d.ts","sourceRoot":"","sources":["../../../src/commands/element/scrollIntoView.ts"],"names":[],"mappings":"AAsBA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,cAAc,CAChC,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,OAAO,GAAE,qBAAqB,GAAG,OAA+C,iBA0EnF"}
@@ -45,10 +45,16 @@ export async function scrollIntoView(options = { block: 'start', inline: 'neares
45
45
  */
46
46
  const elemRect = await browser.getElementRect(this.elementId);
47
47
  const viewport = await browser.getWindowSize();
48
+ let [windowX, windowY] = await browser.execute(() => [
49
+ window.scrollX, window.scrollY
50
+ ]);
51
+ const origin = windowX === 0 && windowY === 0 ? this : undefined;
52
+ windowX = elemRect.x <= viewport.width ? elemRect.x - 10 : viewport.width / 2;
53
+ windowY = elemRect.y <= viewport.height ? elemRect.y - 10 : viewport.height / 2;
48
54
  const deltaByOption = {
49
55
  start: { y: elemRect.y, x: elemRect.x },
50
56
  center: { y: elemRect.y - Math.round((viewport.height - elemRect.height) / 2), x: elemRect.x - Math.round((viewport.width - elemRect.width) / 2) },
51
- end: { y: elemRect.y - (viewport.height - elemRect.height), x: elemRect.x - (viewport.width - elemRect.width) }
57
+ end: { y: elemRect.y - (viewport.height - elemRect.height - 20), x: elemRect.x - (viewport.width - elemRect.width) }
52
58
  };
53
59
  let [deltaX, deltaY] = [deltaByOption.start.x, deltaByOption.start.y];
54
60
  if (options && typeof options !== 'boolean') {
@@ -68,11 +74,21 @@ export async function scrollIntoView(options = { block: 'start', inline: 'neares
68
74
  deltaX = deltaByOption[inline].x;
69
75
  }
70
76
  }
71
- deltaX = Math.round(deltaX);
72
- deltaY = Math.round(deltaY);
77
+ if (origin) {
78
+ deltaX = Math.round(deltaX - elemRect.x);
79
+ deltaY = Math.round(deltaY - (elemRect.y - viewport.height));
80
+ windowX = 0;
81
+ windowY = 0;
82
+ }
83
+ else {
84
+ deltaX = Math.round(deltaX - windowX);
85
+ deltaY = Math.round(deltaY - windowY);
86
+ windowX = Math.round(windowX);
87
+ windowY = Math.round(windowY);
88
+ }
73
89
  try {
74
90
  return await browser.action('wheel')
75
- .scroll({ duration: 200, deltaX, deltaY })
91
+ .scroll({ duration: 200, x: windowX, y: windowY, deltaX, deltaY, origin })
76
92
  .perform();
77
93
  }
78
94
  catch (err) {
@@ -27,7 +27,7 @@
27
27
  * </example>
28
28
  *
29
29
  * @alias element.selectByAttribute
30
- * @param {String} attribute attribute of option element to get selected
30
+ * @param {string} attribute attribute of option element to get selected
31
31
  * @param {String|Number} value value of option element to get selected
32
32
  * @uses protocol/findElementFromElement, protocol/elementClick
33
33
  * @type action
@@ -28,7 +28,7 @@ import { getElementFromResponse } from '../../utils/index.js';
28
28
  * </example>
29
29
  *
30
30
  * @alias element.selectByAttribute
31
- * @param {String} attribute attribute of option element to get selected
31
+ * @param {string} attribute attribute of option element to get selected
32
32
  * @param {String|Number} value value of option element to get selected
33
33
  * @uses protocol/findElementFromElement, protocol/elementClick
34
34
  * @type action
@@ -22,7 +22,7 @@
22
22
  * </example>
23
23
  *
24
24
  * @alias element.selectByIndexs
25
- * @param {Number} index option index
25
+ * @param {number} index option index
26
26
  * @uses protocol/findElementsFromElement, protocol/elementClick
27
27
  * @type action
28
28
  *
@@ -23,7 +23,7 @@ import { getElementFromResponse } from '../../utils/index.js';
23
23
  * </example>
24
24
  *
25
25
  * @alias element.selectByIndexs
26
- * @param {Number} index option index
26
+ * @param {number} index option index
27
27
  * @uses protocol/findElementsFromElement, protocol/elementClick
28
28
  * @type action
29
29
  *
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * get HTML of selector element
3
3
  *
4
- * @param {String} element element to get HTML from
4
+ * @param {string} element element to get HTML from
5
5
  * @param {Boolean} includeSelectorTag if true, selector tag gets included (uses outerHTML)
6
6
  * @return {String} html source
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * get HTML of selector element
3
3
  *
4
- * @param {String} element element to get HTML from
4
+ * @param {string} element element to get HTML from
5
5
  * @param {Boolean} includeSelectorTag if true, selector tag gets included (uses outerHTML)
6
6
  * @return {String} html source
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * get property from element
3
- * @param {String} element element with requested property
4
- * @param {String} property requested property
3
+ * @param {string} element element with requested property
4
+ * @param {string} property requested property
5
5
  * @return {String} the value of the property
6
6
  */
7
7
  export default function getProperty(element: HTMLElement, property: keyof HTMLElement): string | number | boolean | HTMLElement | Element | ChildNode | ParentNode | (() => ElementInternals) | (() => void) | {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * get property from element
3
- * @param {String} element element with requested property
4
- * @param {String} property requested property
3
+ * @param {string} element element with requested property
4
+ * @param {string} property requested property
5
5
  * @return {String} the value of the property
6
6
  */
7
7
  export default function getProperty(element, property) {
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * opens new window via window.open
3
- * @param {String} url The URL to be loaded in the newly opened window.
4
- * @param {String} windowName A string name for the new window.
5
- * @param {String} windowFeatures An optional parameter listing the features (size, position, scrollbars, etc.) of the new window as a string.
3
+ * @param {string} url The URL to be loaded in the newly opened window.
4
+ * @param {string} windowName A string name for the new window.
5
+ * @param {string} windowFeatures An optional parameter listing the features (size, position, scrollbars, etc.) of the new window as a string.
6
6
  *
7
7
  * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.open
8
8
  */
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * opens new window via window.open
3
- * @param {String} url The URL to be loaded in the newly opened window.
4
- * @param {String} windowName A string name for the new window.
5
- * @param {String} windowFeatures An optional parameter listing the features (size, position, scrollbars, etc.) of the new window as a string.
3
+ * @param {string} url The URL to be loaded in the newly opened window.
4
+ * @param {string} windowName A string name for the new window.
5
+ * @param {string} windowFeatures An optional parameter listing the features (size, position, scrollbars, etc.) of the new window as a string.
6
6
  *
7
7
  * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.open
8
8
  */
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Promise-based Timer. Execute fn every tick.
3
3
  * When fn is resolved — timer will stop
4
- * @param {Number} delay - delay between ticks
5
- * @param {Number} timeout - after that time timer will stop
4
+ * @param {number} delay - delay between ticks
5
+ * @param {number} timeout - after that time timer will stop
6
6
  * @param {Function} fn - function that returns promise. will execute every tick
7
- * @param {Boolean} leading - should be function invoked on start
7
+ * @param {boolean} leading - should be function invoked on start
8
8
  * @return {promise} Promise-based Timer.
9
9
  */
10
10
  declare class Timer {
@@ -3,10 +3,10 @@ const NOOP = () => { };
3
3
  /**
4
4
  * Promise-based Timer. Execute fn every tick.
5
5
  * When fn is resolved — timer will stop
6
- * @param {Number} delay - delay between ticks
7
- * @param {Number} timeout - after that time timer will stop
6
+ * @param {number} delay - delay between ticks
7
+ * @param {number} timeout - after that time timer will stop
8
8
  * @param {Function} fn - function that returns promise. will execute every tick
9
- * @param {Boolean} leading - should be function invoked on start
9
+ * @param {boolean} leading - should be function invoked on start
10
10
  * @return {promise} Promise-based Timer.
11
11
  */
12
12
  class Timer {
@@ -6,14 +6,14 @@ interface GetElementProps {
6
6
  }
7
7
  /**
8
8
  * transforms a findElement response into a WDIO element
9
- * @param {String} selector selector that was used to query the element
9
+ * @param {string} selector selector that was used to query the element
10
10
  * @param {Object} res findElement response
11
11
  * @return {Object} WDIO element object
12
12
  */
13
13
  export declare const getElement: (this: WebdriverIO.Browser | WebdriverIO.Element, selector?: Selector, res?: ElementReference | Error, props?: GetElementProps) => WebdriverIO.Element;
14
14
  /**
15
15
  * transforms a findElements response into an array of WDIO elements
16
- * @param {String} selector selector that was used to query the element
16
+ * @param {string} selector selector that was used to query the element
17
17
  * @param {Object} res findElements response
18
18
  * @return {Array} array of WDIO elements
19
19
  */
@@ -6,7 +6,7 @@ import { ELEMENT_KEY } from '../constants.js';
6
6
  import * as browserCommands from '../commands/browser.js';
7
7
  /**
8
8
  * transforms a findElement response into a WDIO element
9
- * @param {String} selector selector that was used to query the element
9
+ * @param {string} selector selector that was used to query the element
10
10
  * @param {Object} res findElement response
11
11
  * @return {Object} WDIO element object
12
12
  */
@@ -63,7 +63,7 @@ export const getElement = function findElement(selector, res, props = { isReactE
63
63
  };
64
64
  /**
65
65
  * transforms a findElements response into an array of WDIO elements
66
- * @param {String} selector selector that was used to query the element
66
+ * @param {string} selector selector that was used to query the element
67
67
  * @param {Object} res findElements response
68
68
  * @return {Array} array of WDIO elements
69
69
  */
@@ -29,7 +29,7 @@ export declare function getBrowserObject(elem: WebdriverIO.Element | WebdriverIO
29
29
  export declare function parseCSS(cssPropertyValue: string, cssProperty?: string): ParsedCSSValue;
30
30
  /**
31
31
  * check for unicode character or split string into literals
32
- * @param {String} value text
32
+ * @param {string} value text
33
33
  * @return {Array} set of characters or unicode symbols
34
34
  */
35
35
  export declare function checkUnicode(value: string, isDevTools?: boolean): string[];
@@ -140,7 +140,7 @@ export function parseCSS(cssPropertyValue, cssProperty) {
140
140
  }
141
141
  /**
142
142
  * check for unicode character or split string into literals
143
- * @param {String} value text
143
+ * @param {string} value text
144
144
  * @return {Array} set of characters or unicode symbols
145
145
  */
146
146
  export function checkUnicode(value, isDevTools = false) {
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": "8.8.2",
4
+ "version": "8.8.6",
5
5
  "homepage": "https://webdriver.io",
6
6
  "author": "Christian Bromann <mail@bromann.dev>",
7
7
  "license": "MIT",
@@ -68,30 +68,30 @@
68
68
  },
69
69
  "dependencies": {
70
70
  "@types/node": "^18.0.0",
71
- "@wdio/config": "8.8.0",
71
+ "@wdio/config": "8.8.6",
72
72
  "@wdio/logger": "8.6.6",
73
73
  "@wdio/protocols": "8.8.1",
74
74
  "@wdio/repl": "8.6.6",
75
- "@wdio/types": "8.8.0",
76
- "@wdio/utils": "8.8.0",
75
+ "@wdio/types": "8.8.6",
76
+ "@wdio/utils": "8.8.6",
77
77
  "archiver": "^5.0.0",
78
78
  "aria-query": "^5.0.0",
79
79
  "css-shorthand-properties": "^1.1.1",
80
80
  "css-value": "^0.0.1",
81
- "devtools": "8.8.2",
82
- "devtools-protocol": "^0.0.1124027",
81
+ "devtools": "8.8.6",
82
+ "devtools-protocol": "^0.0.1130274",
83
83
  "grapheme-splitter": "^1.0.2",
84
84
  "import-meta-resolve": "^2.1.0",
85
85
  "is-plain-obj": "^4.1.0",
86
86
  "lodash.clonedeep": "^4.5.0",
87
87
  "lodash.zip": "^4.2.0",
88
88
  "minimatch": "^9.0.0",
89
- "puppeteer-core": "19.8.5",
89
+ "puppeteer-core": "19.9.1",
90
90
  "query-selector-shadow-dom": "^1.0.0",
91
91
  "resq": "^1.9.1",
92
92
  "rgb2hex": "0.2.5",
93
93
  "serialize-error": "^8.0.0",
94
- "webdriver": "8.8.2"
94
+ "webdriver": "8.8.6"
95
95
  },
96
- "gitHead": "6afeb0448e0e627f1cdc8e081caa2c67fde7b2db"
96
+ "gitHead": "0db3b2f595ef834e6e01f58873dbde776dc08240"
97
97
  }