webdriverio 8.0.8 → 8.0.9

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":"scroll.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/scroll.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAC1B,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,CAAC,SAAI,EACL,CAAC,SAAI,wBAiBR"}
1
+ {"version":3,"file":"scroll.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/scroll.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAC1B,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,CAAC,SAAI,EACL,CAAC,SAAI,wBAsBR"}
@@ -27,6 +27,10 @@ export default function scroll(x = 0, y = 0) {
27
27
  if (!x && !y) {
28
28
  return log.warn('"scroll" command was called with no parameters, skipping execution');
29
29
  }
30
+ // Appium does not support the "wheel" action
31
+ if (this.isMobile) {
32
+ return this.execute((x, y) => window.scrollBy(x, y), x, y);
33
+ }
30
34
  return this.action('wheel')
31
35
  .scroll({
32
36
  deltaX: x,
@@ -1 +1 @@
1
- {"version":3,"file":"scrollIntoView.d.ts","sourceRoot":"","sources":["../../../src/commands/element/scrollIntoView.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAA8B,cAAc,CACxC,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,OAAO,GAAE,qBAAqB,GAAG,OAA+C,iBA8BnF"}
1
+ {"version":3,"file":"scrollIntoView.d.ts","sourceRoot":"","sources":["../../../src/commands/element/scrollIntoView.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAA8B,cAAc,CACxC,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,OAAO,GAAE,qBAAqB,GAAG,OAA+C,iBA0CnF"}
@@ -1,3 +1,4 @@
1
+ import { ELEMENT_KEY } from '../../constants.js';
1
2
  import { getBrowserObject } from '../../utils/index.js';
2
3
  /**
3
4
  *
@@ -22,6 +23,13 @@ import { getBrowserObject } from '../../utils/index.js';
22
23
  */
23
24
  export default async function scrollIntoView(options = { block: 'start', inline: 'nearest' }) {
24
25
  const browser = getBrowserObject(this);
26
+ // Appium does not support the "wheel" action
27
+ if (browser.isMobile) {
28
+ return browser.execute((elem, options) => elem.scrollIntoView(options), {
29
+ [ELEMENT_KEY]: this.elementId,
30
+ ELEMENT: this.elementId, // jsonwp compatible
31
+ }, options);
32
+ }
25
33
  let deltaX = 0;
26
34
  let deltaY = 0;
27
35
  /**
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.0.8",
4
+ "version": "8.0.9",
5
5
  "homepage": "https://webdriver.io",
6
6
  "author": "Christian Bromann <mail@bromann.dev>",
7
7
  "license": "MIT",
@@ -66,18 +66,18 @@
66
66
  "dependencies": {
67
67
  "@types/aria-query": "^5.0.0",
68
68
  "@types/node": "^18.0.0",
69
- "@wdio/config": "8.0.8",
70
- "@wdio/globals": "8.0.8",
69
+ "@wdio/config": "8.0.9",
70
+ "@wdio/globals": "8.0.9",
71
71
  "@wdio/logger": "8.0.0",
72
72
  "@wdio/protocols": "8.0.0",
73
73
  "@wdio/repl": "8.0.0",
74
74
  "@wdio/types": "8.0.8",
75
- "@wdio/utils": "8.0.8",
75
+ "@wdio/utils": "8.0.9",
76
76
  "archiver": "^5.0.0",
77
77
  "aria-query": "^5.0.0",
78
78
  "css-shorthand-properties": "^1.1.1",
79
79
  "css-value": "^0.0.1",
80
- "devtools": "8.0.8",
80
+ "devtools": "8.0.9",
81
81
  "devtools-protocol": "^0.0.1078443",
82
82
  "grapheme-splitter": "^1.0.2",
83
83
  "import-meta-resolve": "^2.1.0",
@@ -90,7 +90,7 @@
90
90
  "resq": "^1.9.1",
91
91
  "rgb2hex": "0.2.5",
92
92
  "serialize-error": "^8.0.0",
93
- "webdriver": "8.0.8"
93
+ "webdriver": "8.0.9"
94
94
  },
95
- "gitHead": "c07255fefc67137fd27f23da5f0792c10157f8c0"
95
+ "gitHead": "f92405a6bab7d0409d3b2777e8d65aaa493a4899"
96
96
  }