webdriverio 8.0.9 → 8.0.10

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.
@@ -38,6 +38,18 @@ import { KeyAction, PointerAction, WheelAction, BaseActionParams } from '../../u
38
38
  * - `up(value: string)`: generates a key up action
39
39
  * - `pause(ms: number)`: indicate that an input source does nothing during a particular tick
40
40
  *
41
+ * #### Special Characters
42
+ *
43
+ * If you like to use special characters like e.g. `Control`, `Page Up` or `Shift`, make sure to import the
44
+ * [`Key`](https://github.com/webdriverio/webdriverio/blob/main/packages/webdriverio/src/constants.ts#L352-L417) object
45
+ * from the `webdriverio` package like so:
46
+ *
47
+ * ```ts
48
+ * import { Key } from 'webdriverio'
49
+ * ```
50
+ *
51
+ * The object allows you to access the unicode representation of the desired special character.
52
+ *
41
53
  * ### Pointer input source
42
54
  *
43
55
  * A pointer input source is an input source that is associated with a pointer-type input device. The type can be
@@ -90,11 +102,13 @@ import { KeyAction, PointerAction, WheelAction, BaseActionParams } from '../../u
90
102
  .move({ duration: 0, origin, x: 0, y: 0 })
91
103
  .down({ button: 0 }) // left button
92
104
  .pause(10)
93
- .move({ duration, origin: targetOrigin })
105
+ .move({ duration: 0, origin: targetOrigin })
94
106
  .up({ button: 0 })
95
107
  .perform()
96
108
  });
97
109
  :key-action.js
110
+ import { Key } from 'webdriverio'
111
+
98
112
  it('should emit key events using key action commands', async () => {
99
113
  const elem = await $('input')
100
114
  await elem.click() // make element active
@@ -109,6 +123,13 @@ import { KeyAction, PointerAction, WheelAction, BaseActionParams } from '../../u
109
123
  .perform()
110
124
 
111
125
  console.log(await elem.getValue()) // returns "foo"
126
+
127
+ // copy value out of input element
128
+ await browser.action('key')
129
+ .down(Key.Ctrl).down('c')
130
+ .pause(10)
131
+ .up(Key.Ctrl).up('c')
132
+ .perform()
112
133
  })
113
134
  :wheel-action.js
114
135
  it('should scroll using wheel action commands', async () => {
@@ -1 +1 @@
1
- {"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW,EAAc,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAElH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8HG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAC1B,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,IAAI,EAAE,KAAK,EACX,IAAI,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,GACpC,SAAS,CAAA;AACZ,MAAM,CAAC,OAAO,UAAU,MAAM,CAC1B,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,IAAI,EAAE,SAAS,EACf,IAAI,CAAC,EAAE,gBAAgB,GACxB,aAAa,CAAA;AAChB,MAAM,CAAC,OAAO,UAAU,MAAM,CAC1B,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,IAAI,EAAE,OAAO,EACb,IAAI,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,GACpC,WAAW,CAAA"}
1
+ {"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW,EAAc,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAElH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmJG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAC1B,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,IAAI,EAAE,KAAK,EACX,IAAI,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,GACpC,SAAS,CAAA;AACZ,MAAM,CAAC,OAAO,UAAU,MAAM,CAC1B,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,IAAI,EAAE,SAAS,EACf,IAAI,CAAC,EAAE,gBAAgB,GACxB,aAAa,CAAA;AAChB,MAAM,CAAC,OAAO,UAAU,MAAM,CAC1B,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,IAAI,EAAE,OAAO,EACb,IAAI,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,GACpC,WAAW,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { KeyAction, PointerAction, WheelAction } from '../../utils/actions/index.js';
2
2
  /**
3
3
  * Allows to run multiple action interaction at once, e.g. to simulate a pinch zoom.
4
- * For more information on the `action` command, check out the [docs](./action).
4
+ * For more information on the `action` command, check out the [docs](/docs/api/browser/action).
5
5
  *
6
6
  * <example>
7
7
  :action.js
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Allows to run multiple action interaction at once, e.g. to simulate a pinch zoom.
3
- * For more information on the `action` command, check out the [docs](./action).
3
+ * For more information on the `action` command, check out the [docs](/docs/api/browser/action).
4
4
  *
5
5
  * <example>
6
6
  :action.js
@@ -1 +1 @@
1
- {"version":3,"file":"getPuppeteer.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/getPuppeteer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,iDAAiD,CAAA;AAO7F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAA8B,YAAY,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,6BA6FpE"}
1
+ {"version":3,"file":"getPuppeteer.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/getPuppeteer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,iDAAiD,CAAA;AAO7F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAA8B,YAAY,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,6BAgGpE"}
@@ -46,6 +46,7 @@ export default async function getPuppeteer() {
46
46
  log.debug('Reusing existing puppeteer session');
47
47
  return this.puppeteer;
48
48
  }
49
+ const { headers } = this.options;
49
50
  const caps = this.capabilities.alwaysMatch || this.capabilities;
50
51
  /**
51
52
  * attach to a Selenium 4 CDP Session if it's returned in the capabilities
@@ -54,7 +55,8 @@ export default async function getPuppeteer() {
54
55
  if (cdpEndpoint) {
55
56
  this.puppeteer = await puppeteer.connect({
56
57
  browserWSEndpoint: cdpEndpoint,
57
- defaultViewport: null
58
+ defaultViewport: null,
59
+ headers
58
60
  });
59
61
  return this.puppeteer;
60
62
  }
@@ -67,7 +69,8 @@ export default async function getPuppeteer() {
67
69
  const { hostname, port } = this.options;
68
70
  this.puppeteer = await puppeteer.connect({
69
71
  browserWSEndpoint: `ws://${hostname}:${port}/devtools/${this.sessionId}`,
70
- defaultViewport: null
72
+ defaultViewport: null,
73
+ headers
71
74
  });
72
75
  return this.puppeteer;
73
76
  }
@@ -1 +1 @@
1
- {"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/keys.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,CAAC,OAAO,UAAU,IAAI,CACxB,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,iBAiC3B"}
1
+ {"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/keys.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,CAAC,OAAO,UAAU,IAAI,CACxB,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,iBAiC3B"}
@@ -37,17 +37,16 @@ import { checkUnicode } from '../../utils/index.js';
37
37
  */
38
38
  export default function keys(value) {
39
39
  let keySequence = [];
40
- const platformName = this.capabilities.platformName;
41
40
  /**
42
41
  * replace key with corresponding unicode character
43
42
  */
44
43
  if (typeof value === 'string') {
45
- keySequence = checkUnicode(value, this.isDevTools, platformName);
44
+ keySequence = checkUnicode(value, this.isDevTools);
46
45
  }
47
46
  else if (Array.isArray(value)) {
48
47
  const charArray = value;
49
48
  for (const charSet of charArray) {
50
- keySequence = keySequence.concat(checkUnicode(charSet, this.isDevTools, platformName));
49
+ keySequence = keySequence.concat(checkUnicode(charSet, this.isDevTools));
51
50
  }
52
51
  }
53
52
  else {
@@ -64,6 +63,7 @@ export default function keys(value) {
64
63
  */
65
64
  const keyAction = this.action('key');
66
65
  keySequence.forEach((value) => keyAction.down(value));
66
+ keyAction.pause(10);
67
67
  keySequence.forEach((value) => keyAction.up(value));
68
68
  return keyAction.perform();
69
69
  }
@@ -1,5 +1,6 @@
1
1
  import BaseAction, { BaseActionParams } from './base.js';
2
2
  export default class KeyAction extends BaseAction {
3
+ #private;
3
4
  constructor(instance: WebdriverIO.Browser, params?: BaseActionParams);
4
5
  /**
5
6
  * Generates a key up action.
@@ -1 +1 @@
1
- {"version":3,"file":"key.d.ts","sourceRoot":"","sources":["../../../src/utils/actions/key.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAExD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,UAAU;gBAChC,QAAQ,EAAE,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,gBAAgB;IAIrE;;;OAGG;IACH,EAAE,CAAE,KAAK,EAAE,MAAM;IAKjB;;;OAGG;IACH,IAAI,CAAE,KAAK,EAAE,MAAM;CAItB"}
1
+ {"version":3,"file":"key.d.ts","sourceRoot":"","sources":["../../../src/utils/actions/key.ts"],"names":[],"mappings":"AAGA,OAAO,UAAU,EAAE,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAGxD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,UAAU;;gBAChC,QAAQ,EAAE,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,gBAAgB;IA4BrE;;;OAGG;IACH,EAAE,CAAE,KAAK,EAAE,MAAM;IAKjB;;;OAGG;IACH,IAAI,CAAE,KAAK,EAAE,MAAM;CAItB"}
@@ -1,14 +1,34 @@
1
+ import os from 'node:os';
1
2
  import BaseAction from './base.js';
3
+ import { Key } from '../../constants.js';
2
4
  export default class KeyAction extends BaseAction {
3
5
  constructor(instance, params) {
4
6
  super(instance, 'key', params);
5
7
  }
8
+ #sanitizeKey(value) {
9
+ if (typeof value !== 'string') {
10
+ throw new Error(`Invalid type for key input: "${typeof value}", expected a string!`);
11
+ }
12
+ const platformName = this.instance.capabilities.platformName;
13
+ const isMac = (
14
+ // check capabilities first
15
+ platformName && platformName.match(/mac(\s)*os/i) ||
16
+ // if not set, expect we run locally
17
+ os.type().match(/darwin/i));
18
+ if (value === Key.Ctrl) {
19
+ return isMac ? Key.Command : Key.Control;
20
+ }
21
+ if (value.length > 1) {
22
+ throw new Error(`Your key input contains more than one character: "${value}", only one is allowed though!`);
23
+ }
24
+ return value;
25
+ }
6
26
  /**
7
27
  * Generates a key up action.
8
28
  * @param value key value
9
29
  */
10
30
  up(value) {
11
- this.sequence.push({ type: 'keyUp', value });
31
+ this.sequence.push({ type: 'keyUp', value: this.#sanitizeKey(value) });
12
32
  return this;
13
33
  }
14
34
  /**
@@ -16,7 +36,7 @@ export default class KeyAction extends BaseAction {
16
36
  * @param value key value
17
37
  */
18
38
  down(value) {
19
- this.sequence.push({ type: 'keyDown', value });
39
+ this.sequence.push({ type: 'keyDown', value: this.#sanitizeKey(value) });
20
40
  return this;
21
41
  }
22
42
  }
@@ -32,7 +32,7 @@ export declare function parseCSS(cssPropertyValue: string, cssProperty?: string)
32
32
  * @param {String} value text
33
33
  * @return {Array} set of characters or unicode symbols
34
34
  */
35
- export declare function checkUnicode(value: string, isDevTools?: boolean, platformName?: string): string[];
35
+ export declare function checkUnicode(value: string, isDevTools?: boolean): string[];
36
36
  /**
37
37
  * logic to find an element
38
38
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,KAAK,EAAE,OAAO,EAAgB,MAAM,aAAa,CAAA;AAOxD,OAAO,KAAK,EAAE,YAAY,EAAmB,QAAQ,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAA;AAMjH,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QAAG,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;KAAE;CACnE;AAeD;;GAEG;AACH,eAAO,MAAM,YAAY,UAAW,SAAS,GAAG,SAAS,uCAexD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,QAAS,gBAAgB,QAuB3D,CAAA;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,CAGtG;AAWD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAE,gBAAgB,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,kBAkDvE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CACxB,KAAK,EAAE,MAAM,EACb,UAAU,UAAQ,EAClB,YAAY,CAAC,EAAE,MAAM,YAmBxB;AA2BD;;GAEG;AACH,wBAAsB,WAAW,CAC7B,IAAI,EAAE,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,EAC/C,QAAQ,EAAE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 -12,7 +12,7 @@ import { UNICODE_CHARACTERS } from '@wdio/utils';
12
12
  import * as browserCommands from '../commands/browser.js';
13
13
  import * as elementCommands from '../commands/element.js';
14
14
  import querySelectorAllDeep from './thirdParty/querySelectorShadowDom.js';
15
- import { ELEMENT_KEY, DRIVER_DEFAULT_ENDPOINT, DEEP_SELECTOR, Key } from '../constants.js';
15
+ import { ELEMENT_KEY, DRIVER_DEFAULT_ENDPOINT, DEEP_SELECTOR } from '../constants.js';
16
16
  import { findStrategy } from './findStrategy.js';
17
17
  const log = logger('webdriverio');
18
18
  const INVALID_SELECTOR_ERROR = 'selector needs to be typeof `string` or `function`';
@@ -140,10 +140,7 @@ export function parseCSS(cssPropertyValue, cssProperty) {
140
140
  * @param {String} value text
141
141
  * @return {Array} set of characters or unicode symbols
142
142
  */
143
- export function checkUnicode(value, isDevTools = false, platformName) {
144
- if (value === Key.Ctrl) {
145
- return [platformName && platformName.match(/mac(\s)*os/i) ? Key.Command : Key.Control];
146
- }
143
+ export function checkUnicode(value, isDevTools = false) {
147
144
  /**
148
145
  * when sending emoji characters like 😄 or a value that is not a special character defined
149
146
  * by the WebDriver protocol
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.9",
4
+ "version": "8.0.10",
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.9",
70
- "@wdio/globals": "8.0.9",
69
+ "@wdio/config": "8.0.10",
70
+ "@wdio/globals": "8.0.10",
71
71
  "@wdio/logger": "8.0.0",
72
72
  "@wdio/protocols": "8.0.0",
73
73
  "@wdio/repl": "8.0.0",
74
- "@wdio/types": "8.0.8",
75
- "@wdio/utils": "8.0.9",
74
+ "@wdio/types": "8.0.10",
75
+ "@wdio/utils": "8.0.10",
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.9",
80
+ "devtools": "8.0.10",
81
81
  "devtools-protocol": "^0.0.1078443",
82
82
  "grapheme-splitter": "^1.0.2",
83
83
  "import-meta-resolve": "^2.1.0",
@@ -85,12 +85,12 @@
85
85
  "lodash.clonedeep": "^4.5.0",
86
86
  "lodash.zip": "^4.2.0",
87
87
  "minimatch": "^5.0.0",
88
- "puppeteer-core": "19.3.0",
88
+ "puppeteer-core": "19.4.0",
89
89
  "query-selector-shadow-dom": "^1.0.0",
90
90
  "resq": "^1.9.1",
91
91
  "rgb2hex": "0.2.5",
92
92
  "serialize-error": "^8.0.0",
93
- "webdriver": "8.0.9"
93
+ "webdriver": "8.0.10"
94
94
  },
95
- "gitHead": "f92405a6bab7d0409d3b2777e8d65aaa493a4899"
95
+ "gitHead": "1c350a14144ecc5f1ebc598c385bae6aa80739c3"
96
96
  }