webdriverio 8.32.3 → 8.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Uploads a file to the Selenium Standalone server or other browser driver
3
- * (e.g. Chromedriver) by using the [`file`](https://webdriver.io/docs/api/selenium#file) command.
4
- * _Note:_ that this command is only supported if you use a Selenium Hub or
5
- * Chromedriver directly.
3
+ * (e.g. Chromedriver or EdgeDriver) by using the [`file`](https://webdriver.io/docs/api/selenium#file) command.
4
+ * _Note:_ that this command is only supported if you use a Selenium Hub,
5
+ * Chromedriver or EdgeDriver directly.
6
6
  *
7
7
  * __Note:__ this command uses an un-offical protocol feature that is currently
8
8
  * only supported in Chrome and when running a [Selenium Grid](https://www.selenium.dev/documentation/en/grid/).
@@ -3,9 +3,9 @@ import path from 'node:path';
3
3
  import archiver from 'archiver';
4
4
  /**
5
5
  * Uploads a file to the Selenium Standalone server or other browser driver
6
- * (e.g. Chromedriver) by using the [`file`](https://webdriver.io/docs/api/selenium#file) command.
7
- * _Note:_ that this command is only supported if you use a Selenium Hub or
8
- * Chromedriver directly.
6
+ * (e.g. Chromedriver or EdgeDriver) by using the [`file`](https://webdriver.io/docs/api/selenium#file) command.
7
+ * _Note:_ that this command is only supported if you use a Selenium Hub,
8
+ * Chromedriver or EdgeDriver directly.
9
9
  *
10
10
  * __Note:__ this command uses an un-offical protocol feature that is currently
11
11
  * only supported in Chrome and when running a [Selenium Grid](https://www.selenium.dev/documentation/en/grid/).
@@ -76,7 +76,7 @@ import type { ClickOptions } from '../../types.js';
76
76
  * @param {string= | number=} options.button can be one of [0, "left", 1, "middle", 2, "right"] (optional)
77
77
  * @param {number=} options.x Number (optional)
78
78
  * @param {number=} options.y Number (optional)
79
- * @param {number=} options.skipRelease Boolean (optional)
79
+ * @param {boolean=} options.skipRelease Boolean (optional)
80
80
  */
81
81
  export declare function click(this: WebdriverIO.Element, options?: ClickOptions): Promise<void>;
82
82
  //# sourceMappingURL=click.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"click.d.ts","sourceRoot":"","sources":["../../../src/commands/element/click.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAGlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8EG;AACH,wBAAsB,KAAK,CACvB,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,OAAO,CAAC,EAAE,YAAY,iBA+EzB"}
1
+ {"version":3,"file":"click.d.ts","sourceRoot":"","sources":["../../../src/commands/element/click.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAIlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8EG;AACH,wBAAsB,KAAK,CACvB,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,OAAO,CAAC,EAAE,YAAY,iBA+EzB"}
@@ -1,4 +1,6 @@
1
+ import logger from '@wdio/logger';
1
2
  import { getBrowserObject } from '../../utils/index.js';
3
+ const log = logger('webdriver');
2
4
  /**
3
5
  *
4
6
  * Click on an element.
@@ -76,7 +78,7 @@ import { getBrowserObject } from '../../utils/index.js';
76
78
  * @param {string= | number=} options.button can be one of [0, "left", 1, "middle", 2, "right"] (optional)
77
79
  * @param {number=} options.x Number (optional)
78
80
  * @param {number=} options.y Number (optional)
79
- * @param {number=} options.skipRelease Boolean (optional)
81
+ * @param {boolean=} options.skipRelease Boolean (optional)
80
82
  */
81
83
  export async function click(options) {
82
84
  if (typeof options === 'undefined') {
@@ -110,10 +112,10 @@ export async function click(options) {
110
112
  if (xOffset || yOffset) {
111
113
  const { width, height } = await browser.getElementRect(this.elementId);
112
114
  if ((xOffset && xOffset < (-Math.floor(width / 2))) || (xOffset && xOffset > Math.floor(width / 2))) {
113
- throw new Error('xOffset would cause a out of bounds error as it goes outside of element');
115
+ log.warn('xOffset would cause a out of bounds error as it goes outside of element');
114
116
  }
115
117
  if ((yOffset && yOffset < (-Math.floor(height / 2))) || (yOffset && yOffset > Math.floor(height / 2))) {
116
- throw new Error('yOffset would cause a out of bounds error as it goes outside of element');
118
+ log.warn('yOffset would cause a out of bounds error as it goes outside of element');
117
119
  }
118
120
  }
119
121
  const clickNested = async () => {
@@ -1,7 +1,4 @@
1
- type MoveToOptions = {
2
- xOffset?: number;
3
- yOffset?: number;
4
- };
1
+ import type { MoveToOptions } from '../../types.js';
5
2
  /**
6
3
  *
7
4
  * Move the mouse by an offset of the specified element. If no element is specified,
@@ -17,5 +14,4 @@ type MoveToOptions = {
17
14
  * @type protocol
18
15
  */
19
16
  export declare function moveTo(this: WebdriverIO.Element, { xOffset, yOffset }?: MoveToOptions): Promise<void>;
20
- export {};
21
17
  //# sourceMappingURL=moveTo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"moveTo.d.ts","sourceRoot":"","sources":["../../../src/commands/element/moveTo.ts"],"names":[],"mappings":"AAEA,KAAK,aAAa,GAAG;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,MAAM,CACxB,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,EAAE,OAAO,EAAE,OAAO,EAAE,GAAE,aAAkB,iBAkC3C"}
1
+ {"version":3,"file":"moveTo.d.ts","sourceRoot":"","sources":["../../../src/commands/element/moveTo.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAInD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,MAAM,CACxB,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,EAAE,OAAO,EAAE,OAAO,EAAE,GAAE,aAAkB,iBAkC3C"}
@@ -1,4 +1,6 @@
1
+ import logger from '@wdio/logger';
1
2
  import { getBrowserObject } from '../../utils/index.js';
3
+ const log = logger('webdriver');
2
4
  /**
3
5
  *
4
6
  * Move the mouse by an offset of the specified element. If no element is specified,
@@ -24,10 +26,10 @@ export async function moveTo({ xOffset, yOffset } = {}) {
24
26
  if (xOffset || yOffset) {
25
27
  const { width, height } = await browser.getElementRect(this.elementId);
26
28
  if ((xOffset && xOffset < (-Math.floor(width / 2))) || (xOffset && xOffset > Math.floor(width / 2))) {
27
- throw new Error('xOffset would cause a out of bounds error as it goes outside of element');
29
+ log.warn('xOffset would cause a out of bounds error as it goes outside of element');
28
30
  }
29
31
  if ((yOffset && yOffset < (-Math.floor(height / 2))) || (yOffset && yOffset > Math.floor(height / 2))) {
30
- throw new Error('yOffset would cause a out of bounds error as it goes outside of element');
32
+ log.warn('yOffset would cause a out of bounds error as it goes outside of element');
31
33
  }
32
34
  }
33
35
  const moveToNested = async () => {
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.32.3",
4
+ "version": "8.33.0",
5
5
  "homepage": "https://webdriver.io",
6
6
  "author": "Christian Bromann <mail@bromann.dev>",
7
7
  "license": "MIT",
@@ -69,17 +69,17 @@
69
69
  },
70
70
  "dependencies": {
71
71
  "@types/node": "^20.1.0",
72
- "@wdio/config": "8.32.3",
72
+ "@wdio/config": "8.33.0",
73
73
  "@wdio/logger": "8.28.0",
74
74
  "@wdio/protocols": "8.32.0",
75
75
  "@wdio/repl": "8.24.12",
76
- "@wdio/types": "8.32.2",
77
- "@wdio/utils": "8.32.3",
78
- "archiver": "^6.0.0",
76
+ "@wdio/types": "8.32.4",
77
+ "@wdio/utils": "8.33.0",
78
+ "archiver": "^7.0.0",
79
79
  "aria-query": "^5.0.0",
80
80
  "css-shorthand-properties": "^1.1.1",
81
81
  "css-value": "^0.0.1",
82
- "devtools-protocol": "^0.0.1262051",
82
+ "devtools-protocol": "^0.0.1263784",
83
83
  "grapheme-splitter": "^1.0.2",
84
84
  "import-meta-resolve": "^4.0.0",
85
85
  "is-plain-obj": "^4.1.0",
@@ -91,7 +91,7 @@
91
91
  "resq": "^1.9.1",
92
92
  "rgb2hex": "0.2.5",
93
93
  "serialize-error": "^11.0.1",
94
- "webdriver": "8.32.3"
94
+ "webdriver": "8.33.0"
95
95
  },
96
96
  "peerDependencies": {
97
97
  "devtools": "^8.14.0"
@@ -101,5 +101,5 @@
101
101
  "optional": true
102
102
  }
103
103
  },
104
- "gitHead": "bfb72529ea47c1656a90c56aec26f80dae09c667"
104
+ "gitHead": "b00f5062e9ca87d6b2d01b1e9fa66ab15d8636b4"
105
105
  }