webdriverio 8.32.2 → 8.32.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.
- package/build/commands/element/click.d.ts +1 -1
- package/build/commands/element/click.d.ts.map +1 -1
- package/build/commands/element/click.js +5 -3
- package/build/commands/element/getLocation.d.ts +1 -0
- package/build/commands/element/getLocation.d.ts.map +1 -1
- package/build/commands/element/getSize.d.ts +1 -0
- package/build/commands/element/getSize.d.ts.map +1 -1
- package/build/commands/element/moveTo.d.ts +1 -5
- package/build/commands/element/moveTo.d.ts.map +1 -1
- package/build/commands/element/moveTo.js +4 -2
- package/package.json +7 -7
|
@@ -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 {
|
|
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":"
|
|
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 {
|
|
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
|
-
|
|
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
|
-
|
|
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 () => {
|
|
@@ -2,4 +2,5 @@ import type { RectReturn } from '@wdio/protocols';
|
|
|
2
2
|
export type Location = Pick<RectReturn, 'x' | 'y'>;
|
|
3
3
|
export declare function getLocation(this: WebdriverIO.Element): Promise<Location>;
|
|
4
4
|
export declare function getLocation(this: WebdriverIO.Element, prop: keyof Location): Promise<number>;
|
|
5
|
+
export declare function getLocation(this: WebdriverIO.Element, prop?: keyof Location): Promise<Location & number>;
|
|
5
6
|
//# sourceMappingURL=getLocation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getLocation.d.ts","sourceRoot":"","sources":["../../../src/commands/element/getLocation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAGjD,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;AAEnD,wBAAgB,WAAW,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAA;AAC1E,wBAAgB,WAAW,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"getLocation.d.ts","sourceRoot":"","sources":["../../../src/commands/element/getLocation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAGjD,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;AAEnD,wBAAgB,WAAW,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAA;AAC1E,wBAAgB,WAAW,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC9F,wBAAgB,WAAW,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,CAAA"}
|
|
@@ -2,4 +2,5 @@ import type { RectReturn } from '@wdio/protocols';
|
|
|
2
2
|
export type Size = Pick<RectReturn, 'width' | 'height'>;
|
|
3
3
|
export declare function getSize(this: WebdriverIO.Element): Promise<Size>;
|
|
4
4
|
export declare function getSize(this: WebdriverIO.Element, prop: keyof RectReturn): Promise<number>;
|
|
5
|
+
export declare function getSize(this: WebdriverIO.Element, prop?: keyof RectReturn): Promise<Size & number>;
|
|
5
6
|
//# sourceMappingURL=getSize.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSize.d.ts","sourceRoot":"","sources":["../../../src/commands/element/getSize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAIjD,MAAM,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;AAExD,wBAAgB,OAAO,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACnE,wBAAgB,OAAO,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"getSize.d.ts","sourceRoot":"","sources":["../../../src/commands/element/getSize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAIjD,MAAM,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;AAExD,wBAAgB,OAAO,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACnE,wBAAgB,OAAO,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAC7F,wBAAgB,OAAO,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC"}
|
|
@@ -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":"
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
4
|
+
"version": "8.32.4",
|
|
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.
|
|
72
|
+
"@wdio/config": "8.32.4",
|
|
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.
|
|
77
|
-
"@wdio/utils": "8.32.
|
|
76
|
+
"@wdio/types": "8.32.4",
|
|
77
|
+
"@wdio/utils": "8.32.4",
|
|
78
78
|
"archiver": "^6.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.
|
|
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.
|
|
94
|
+
"webdriver": "8.32.4"
|
|
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": "
|
|
104
|
+
"gitHead": "f8d2d051d1331f4c24521a3c3b0e830ff3e45282"
|
|
105
105
|
}
|