webdriverio 9.23.2 → 9.23.3

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 +1 @@
1
- {"version":3,"file":"deleteCookies.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/deleteCookies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAEvC;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CAC/B,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,EAAE,GACvF,OAAO,CAAC,IAAI,CAAC,CA6Cf"}
1
+ {"version":3,"file":"deleteCookies.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/deleteCookies.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAIvC;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CAC/B,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,EAAE,GACvF,OAAO,CAAC,IAAI,CAAC,CAgEf"}
@@ -1 +1 @@
1
- {"version":3,"file":"getCookies.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/getCookies.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAIvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAsB,UAAU,CAC5B,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,mBAAmB,GACxD,OAAO,CAAC,MAAM,EAAE,CAAC,CAgBnB"}
1
+ {"version":3,"file":"getCookies.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/getCookies.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAIvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAsB,UAAU,CAC5B,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,mBAAmB,GACxD,OAAO,CAAC,MAAM,EAAE,CAAC,CAmDnB"}
@@ -9,7 +9,7 @@ type PDFPrintOptions = {
9
9
  left?: number;
10
10
  right?: number;
11
11
  shrinkToFit?: boolean;
12
- pageRanges?: object[];
12
+ pageRanges?: Array<string | number>;
13
13
  };
14
14
  /**
15
15
  *
@@ -35,7 +35,7 @@ type PDFPrintOptions = {
35
35
  * @param {number=} options.left Left padding of PDF page
36
36
  * @param {number=} options.right Right padding of PDF page
37
37
  * @param {boolean=} options.shrinkToFit Shrink page to fit page
38
- * @param {object[]} options.pageRanges Range of pages to include in PDF
38
+ * @param {Array<string|number>=} options.pageRanges Range of pages to include in PDF
39
39
  * @return {Buffer} screenshot buffer
40
40
  * @type utility
41
41
  *
@@ -1 +1 @@
1
- {"version":3,"file":"savePDF.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/savePDF.ts"],"names":[],"mappings":"AAEA,KAAK,eAAe,GAAG;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACxB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,OAAO,CACzB,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,eAAe,GAC1B,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAK9B"}
1
+ {"version":3,"file":"savePDF.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/savePDF.ts"],"names":[],"mappings":"AAEA,KAAK,eAAe,GAAG;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAA;CACtC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,OAAO,CACzB,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,eAAe,GAC1B,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAK9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"setCookies.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/setCookies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,wBAAsB,UAAU,CAC5B,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,GAC9B,OAAO,CAAC,IAAI,CAAC,CAoCf"}
1
+ {"version":3,"file":"setCookies.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/setCookies.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAI7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,wBAAsB,UAAU,CAC5B,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,GAC9B,OAAO,CAAC,IAAI,CAAC,CAoDf"}
@@ -24,5 +24,5 @@
24
24
  * @type property
25
25
  *
26
26
  */
27
- export declare function getAttribute(this: WebdriverIO.Element, attributeName: string): Promise<string>;
27
+ export declare function getAttribute(this: WebdriverIO.Element, attributeName: string): Promise<string | null>;
28
28
  //# sourceMappingURL=getAttribute.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getAttribute.d.ts","sourceRoot":"","sources":["../../../src/commands/element/getAttribute.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,YAAY,CACxB,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,aAAa,EAAE,MAAM,mBAGxB"}
1
+ {"version":3,"file":"getAttribute.d.ts","sourceRoot":"","sources":["../../../src/commands/element/getAttribute.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,YAAY,CACxB,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,aAAa,EAAE,MAAM,0BAGxB"}
@@ -1,6 +1,32 @@
1
1
  import type { RectReturn } from '@wdio/protocols';
2
2
  export type Location = Pick<RectReturn, 'x' | 'y'>;
3
+ /**
4
+ *
5
+ * Determine an element’s location on the page. The point (0, 0) refers to
6
+ * the upper-left corner of the page.
7
+ *
8
+ * <example>
9
+ :getLocation.js
10
+ it('should demonstrate the getLocation function', async () => {
11
+ await browser.url('http://github.com');
12
+ const logo = await $('.octicon-mark-github')
13
+ const location = await logo.getLocation();
14
+ console.log(location); // outputs: { x: 150, y: 20 }
15
+
16
+ const xLocation = await logo.getLocation('x')
17
+ console.log(xLocation); // outputs: 150
18
+
19
+ const yLocation = await logo.getLocation('y')
20
+ console.log(yLocation); // outputs: 20
21
+ });
22
+ * </example>
23
+ *
24
+ * @alias element.getLocation
25
+ * @param {string} prop can be "x" or "y" to get a result value directly for easier assertions
26
+ * @return {Object|Number} The X and Y coordinates for the element on the page `{x:number, y:number}`
27
+ * @uses protocol/elementIdLocation
28
+ * @type property
29
+ */
3
30
  export declare function getLocation(this: WebdriverIO.Element): Promise<Location>;
4
31
  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>;
6
32
  //# 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,CAAA;AAElD,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"}
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,CAAA;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,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,6 +1,32 @@
1
1
  import type { RectReturn } from '@wdio/protocols';
2
2
  export type Size = Pick<RectReturn, 'width' | 'height'>;
3
+ /**
4
+ *
5
+ * Get the width and height for an DOM-element.
6
+ *
7
+ * <example>
8
+ :getSize.js
9
+ it('should demonstrate the getSize command', async () => {
10
+ await browser.url('http://github.com')
11
+ const logo = await $('.octicon-mark-github')
12
+
13
+ const size = await logo.getSize()
14
+ console.log(size) // outputs: { width: 32, height: 32 }
15
+
16
+ const width = await logo.getSize('width')
17
+ console.log(width) // outputs: 32
18
+
19
+ const height = await logo.getSize('height')
20
+ console.log(height) // outputs: 32
21
+ })
22
+ * </example>
23
+ *
24
+ * @alias element.getElementSize
25
+ * @param {String=} prop size to receive [optional] ("width" or "height")
26
+ * @return {Object|Number} requested element size (`{ width: <Number>, height: <Number> }`) or actual width/height as number if prop param is given
27
+ * @type property
28
+ *
29
+ */
3
30
  export declare function getSize(this: WebdriverIO.Element): Promise<Size>;
4
31
  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>;
6
32
  //# 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,CAAA;AAEvD,wBAAgB,OAAO,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AAClE,wBAAgB,OAAO,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC5F,wBAAgB,OAAO,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,CAAA"}
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,CAAA;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,OAAO,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AACxE,wBAAsB,OAAO,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA"}
@@ -20,5 +20,5 @@
20
20
  * @uses protocol/elements, protocol/elementIdProperty
21
21
  *
22
22
  */
23
- export declare function getValue(this: WebdriverIO.Element): Promise<string>;
23
+ export declare function getValue(this: WebdriverIO.Element): Promise<unknown>;
24
24
  //# sourceMappingURL=getValue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getValue.d.ts","sourceRoot":"","sources":["../../../src/commands/element/getValue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,QAAQ,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,mBAOlD"}
1
+ {"version":3,"file":"getValue.d.ts","sourceRoot":"","sources":["../../../src/commands/element/getValue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,QAAQ,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,oBAOlD"}
@@ -1 +1 @@
1
- {"version":3,"file":"waitForClickable.d.ts","sourceRoot":"","sources":["../../../src/commands/element/waitForClickable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAGpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAsB,gBAAgB,CAClC,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,EACI,OAAqC,EACrC,QAAuC,EACvC,OAAe,EACf,UAAsG,EACzG,GAAE,cAAmB,iBAWzB"}
1
+ {"version":3,"file":"waitForClickable.d.ts","sourceRoot":"","sources":["../../../src/commands/element/waitForClickable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAGpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAsB,gBAAgB,CAClC,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,EACI,OAAqC,EACrC,QAAuC,EACvC,OAAe,EACf,UAAsG,EACzG,GAAE,cAAmB,iBAezB"}