webdriverio 8.3.10 → 8.4.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.
Files changed (32) hide show
  1. package/build/commands/browser/$$.d.ts +4 -33
  2. package/build/commands/browser/$$.d.ts.map +1 -1
  3. package/build/commands/browser/$$.js +4 -33
  4. package/build/commands/browser/$.d.ts +4 -27
  5. package/build/commands/browser/$.d.ts.map +1 -1
  6. package/build/commands/browser/$.js +4 -27
  7. package/build/commands/browser/action.d.ts +1 -1
  8. package/build/commands/browser/deleteCookies.d.ts +2 -35
  9. package/build/commands/browser/deleteCookies.d.ts.map +1 -1
  10. package/build/commands/browser/deleteCookies.js +2 -35
  11. package/build/commands/browser/keys.d.ts +1 -16
  12. package/build/commands/browser/keys.d.ts.map +1 -1
  13. package/build/commands/browser/keys.js +1 -16
  14. package/build/commands/browser/waitUntil.d.ts +2 -22
  15. package/build/commands/browser/waitUntil.d.ts.map +1 -1
  16. package/build/commands/browser/waitUntil.js +2 -22
  17. package/build/commands/element/$$.d.ts +4 -26
  18. package/build/commands/element/$$.d.ts.map +1 -1
  19. package/build/commands/element/$$.js +4 -26
  20. package/build/commands/element/$.d.ts +4 -28
  21. package/build/commands/element/$.d.ts.map +1 -1
  22. package/build/commands/element/$.js +4 -28
  23. package/build/commands/element/waitForDisplayed.d.ts +2 -20
  24. package/build/commands/element/waitForDisplayed.d.ts.map +1 -1
  25. package/build/commands/element/waitForDisplayed.js +2 -20
  26. package/build/commands/element/waitUntil.d.ts +2 -21
  27. package/build/commands/element/waitUntil.d.ts.map +1 -1
  28. package/build/commands/element/waitUntil.js +2 -21
  29. package/build/utils/actions/pointer.d.ts +1 -1
  30. package/build/utils/index.d.ts.map +1 -1
  31. package/build/utils/index.js +7 -1
  32. package/package.json +11 -11
@@ -16,42 +16,13 @@ import type { Selector, ElementArray } from '../../types.js';
16
16
  *
17
17
  * :::
18
18
  *
19
- * <example>
20
- :index.html
21
- <ul id="menu">
22
- <li><a href="/">Home</a></li>
23
- <li><a href="/">Developer Guide</a></li>
24
- <li><a href="/">API</a></li>
25
- <li><a href="/">Contribute</a></li>
26
- </ul>
27
- :$.js
28
- it('should get text a menu link', async () => {
29
- const text = await $$('#menu')[0];
30
- console.log(await text.$$('li')[2].$('a').getText()); // outputs: "API"
31
- });
32
-
33
- it('should get text a menu link - JS Function', async () => {
34
- const text = await $$(function() { // Arrow function is not allowed here.
35
- // this is Window https://developer.mozilla.org/en-US/docs/Web/API/Window
36
- // TypeScript users may do something like this
37
- // return (this as Window).document.querySelectorAll('#menu')
38
- return this.document.querySelectorAll('#menu'); // Element[]
39
- })[0];
40
- console.log(await text.$$('li')[2].$('a').getText()); // outputs: "API"
41
- });
42
-
43
- it('can create element array out of single elements', async () => {
44
- const red = await $('.red');
45
- const green = await $('.green');
46
- const elems = $$([red, green]);
47
- console.log(await elems.map((e) => e.getAttribute('class')));
48
- // returns "[ 'box red ui-droppable', 'box green' ]"
49
- });
50
- * </example>
51
- *
52
19
  * @alias $$
53
20
  * @param {String|Function} selector selector or JS Function to fetch multiple elements
54
21
  * @return {ElementArray}
22
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/example.html
23
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/multipleElements.js#L6-L7
24
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/multipleElements.js#L15-L24
25
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/multipleElements.js#L32-L39
55
26
  * @type utility
56
27
  *
57
28
  */
@@ -1 +1 @@
1
- {"version":3,"file":"$$.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/$$.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAIvD,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAsB,EAAE,CACpB,IAAI,EAAE,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,EAC/C,QAAQ,EAAE,QAAQ,GAAG,gBAAgB,EAAE,GAAG,WAAW,CAAC,OAAO,EAAE,GAAG,WAAW,EAAE,yBAkBlF"}
1
+ {"version":3,"file":"$$.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/$$.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAIvD,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,EAAE,CACpB,IAAI,EAAE,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,EAC/C,QAAQ,EAAE,QAAQ,GAAG,gBAAgB,EAAE,GAAG,WAAW,CAAC,OAAO,EAAE,GAAG,WAAW,EAAE,yBAkBlF"}
@@ -16,42 +16,13 @@ import { getElements } from '../../utils/getElementObject.js';
16
16
  *
17
17
  * :::
18
18
  *
19
- * <example>
20
- :index.html
21
- <ul id="menu">
22
- <li><a href="/">Home</a></li>
23
- <li><a href="/">Developer Guide</a></li>
24
- <li><a href="/">API</a></li>
25
- <li><a href="/">Contribute</a></li>
26
- </ul>
27
- :$.js
28
- it('should get text a menu link', async () => {
29
- const text = await $$('#menu')[0];
30
- console.log(await text.$$('li')[2].$('a').getText()); // outputs: "API"
31
- });
32
-
33
- it('should get text a menu link - JS Function', async () => {
34
- const text = await $$(function() { // Arrow function is not allowed here.
35
- // this is Window https://developer.mozilla.org/en-US/docs/Web/API/Window
36
- // TypeScript users may do something like this
37
- // return (this as Window).document.querySelectorAll('#menu')
38
- return this.document.querySelectorAll('#menu'); // Element[]
39
- })[0];
40
- console.log(await text.$$('li')[2].$('a').getText()); // outputs: "API"
41
- });
42
-
43
- it('can create element array out of single elements', async () => {
44
- const red = await $('.red');
45
- const green = await $('.green');
46
- const elems = $$([red, green]);
47
- console.log(await elems.map((e) => e.getAttribute('class')));
48
- // returns "[ 'box red ui-droppable', 'box green' ]"
49
- });
50
- * </example>
51
- *
52
19
  * @alias $$
53
20
  * @param {String|Function} selector selector or JS Function to fetch multiple elements
54
21
  * @return {ElementArray}
22
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/example.html
23
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/multipleElements.js#L6-L7
24
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/multipleElements.js#L15-L24
25
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/multipleElements.js#L32-L39
55
26
  * @type utility
56
27
  *
57
28
  */
@@ -23,34 +23,7 @@ import type { Selector } from '../../types.js';
23
23
  * :::
24
24
  *
25
25
  * <example>
26
- :index.html
27
- <ul id="menu">
28
- <li><a href="/">Home</a></li>
29
- <li><a href="/">Developer Guide</a></li>
30
- <li><a href="/">API</a></li>
31
- <li><a href="/">Contribute</a></li>
32
- </ul>
33
26
  :$.js
34
- it('should get text a menu link', async () => {
35
- const text = await $('#menu');
36
- console.log(await text.$$('li')[2].$('a').getText()); // outputs: "API"
37
- });
38
-
39
- it('should get text a menu link - JS Function', async () => {
40
- const text = await $(function() { // Arrow function is not allowed here.
41
- // this is Window https://developer.mozilla.org/en-US/docs/Web/API/Window
42
- // TypeScript users may do something like this
43
- // return (this as Window).document.querySelector('#menu')
44
- return this.document.querySelector('#menu'); // Element
45
- });
46
- console.log(await text.$$('li')[2].$('a').getText()); // outputs: "API"
47
- });
48
-
49
- it('should allow to convert protocol result of an element into a WebdriverIO element', async () => {
50
- const activeElement = await browser.getActiveElement();
51
- console.log(await $(activeElement).getTagName()); // outputs active element
52
- });
53
-
54
27
  it('should use Androids DataMatcher or ViewMatcher selector', async () => {
55
28
  const menuItem = await $({
56
29
  "name": "hasEntry",
@@ -70,6 +43,10 @@ import type { Selector } from '../../types.js';
70
43
  * @alias $
71
44
  * @param {String|Function|Matcher} selector selector, JS Function, or Matcher object to fetch a certain element
72
45
  * @return {Element}
46
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/example.html
47
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/singleElements.js#L9-L10
48
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/singleElements.js#L16-L25
49
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/singleElements.js#L42-L46
73
50
  * @type utility
74
51
  *
75
52
  */
@@ -1 +1 @@
1
- {"version":3,"file":"$.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/$.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAG9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AACH,wBAAsB,CAAC,CACnB,IAAI,EAAE,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,EAC/C,QAAQ,EAAE,QAAQ,GACnB,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAc9B"}
1
+ {"version":3,"file":"$.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/$.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAG9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,wBAAsB,CAAC,CACnB,IAAI,EAAE,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,EAC/C,QAAQ,EAAE,QAAQ,GACnB,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAc9B"}
@@ -25,34 +25,7 @@ import { ELEMENT_KEY } from '../../constants.js';
25
25
  * :::
26
26
  *
27
27
  * <example>
28
- :index.html
29
- <ul id="menu">
30
- <li><a href="/">Home</a></li>
31
- <li><a href="/">Developer Guide</a></li>
32
- <li><a href="/">API</a></li>
33
- <li><a href="/">Contribute</a></li>
34
- </ul>
35
28
  :$.js
36
- it('should get text a menu link', async () => {
37
- const text = await $('#menu');
38
- console.log(await text.$$('li')[2].$('a').getText()); // outputs: "API"
39
- });
40
-
41
- it('should get text a menu link - JS Function', async () => {
42
- const text = await $(function() { // Arrow function is not allowed here.
43
- // this is Window https://developer.mozilla.org/en-US/docs/Web/API/Window
44
- // TypeScript users may do something like this
45
- // return (this as Window).document.querySelector('#menu')
46
- return this.document.querySelector('#menu'); // Element
47
- });
48
- console.log(await text.$$('li')[2].$('a').getText()); // outputs: "API"
49
- });
50
-
51
- it('should allow to convert protocol result of an element into a WebdriverIO element', async () => {
52
- const activeElement = await browser.getActiveElement();
53
- console.log(await $(activeElement).getTagName()); // outputs active element
54
- });
55
-
56
29
  it('should use Androids DataMatcher or ViewMatcher selector', async () => {
57
30
  const menuItem = await $({
58
31
  "name": "hasEntry",
@@ -72,6 +45,10 @@ import { ELEMENT_KEY } from '../../constants.js';
72
45
  * @alias $
73
46
  * @param {String|Function|Matcher} selector selector, JS Function, or Matcher object to fetch a certain element
74
47
  * @return {Element}
48
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/example.html
49
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/singleElements.js#L9-L10
50
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/singleElements.js#L16-L25
51
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/singleElements.js#L42-L46
75
52
  * @type utility
76
53
  *
77
54
  */
@@ -57,7 +57,7 @@ import { KeyAction, PointerAction, WheelAction } from '../../utils/actions/index
57
57
  * specified when invoking the `action` command, e.g.:
58
58
  *
59
59
  * ```ts
60
- * browser.action('pointer'. {
60
+ * browser.action('pointer', {
61
61
  * parameters: { pointerType: 'mouse' } // "mouse" is default value, also possible: "pen" or "touch"
62
62
  * })
63
63
  * ```
@@ -2,44 +2,11 @@
2
2
  * Delete cookies visible to the current page. By providing a cookie name it
3
3
  * just removes the single cookie or more when multiple names are passed.
4
4
  *
5
- * <example>
6
- :deleteCookie.js
7
- it('should delete cookies', async () => {
8
- await browser.setCookies([
9
- {name: 'test', value: '123'},
10
- {name: 'test2', value: '456'},
11
- {name: 'test3', value: '789'}
12
- ])
13
-
14
- let cookies = await browser.getCookies()
15
- console.log(cookies)
16
- // outputs:
17
- // [
18
- // { name: 'test', value: '123' },
19
- // { name: 'test2', value: '456' }
20
- // { name: 'test3', value: '789' }
21
- // ]
22
-
23
- await browser.deleteCookies(['test3'])
24
- cookies = await browser.getCookies()
25
- console.log(cookies)
26
- // outputs:
27
- // [
28
- // { name: 'test', value: '123' },
29
- // { name: 'test2', value: '456' }
30
- // ]
31
-
32
- await browser.deleteCookies()
33
- cookies = await browser.getCookies()
34
- console.log(cookies) // outputs: []
35
- })
36
- * </example>
37
- *
38
5
  * @alias browser.deleteCookies
39
6
  * @param {String | String[]} names names of cookies to be deleted
40
7
  * @uses webdriver/deleteAllCookies,webdriver/deleteCookie
41
- * @type cookie
42
- *
8
+ * @example https://github.com/webdriverio/example-recipes/blob/e8b147e88e7a38351b0918b4f7efbd9ae292201d/deleteCookies/example.js#L9-L29
9
+ * @example https://github.com/webdriverio/example-recipes/blob/e8b147e88e7a38351b0918b4f7efbd9ae292201d/deleteCookies/example.js#L31-L35
43
10
  */
44
11
  export declare function deleteCookies(this: WebdriverIO.Browser, names?: string | string[]): Promise<void> | Promise<void[]>;
45
12
  //# sourceMappingURL=deleteCookies.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deleteCookies.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/deleteCookies.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,aAAa,CACzB,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,mCAa5B"}
1
+ {"version":3,"file":"deleteCookies.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/deleteCookies.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CACzB,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,mCAa5B"}
@@ -2,44 +2,11 @@
2
2
  * Delete cookies visible to the current page. By providing a cookie name it
3
3
  * just removes the single cookie or more when multiple names are passed.
4
4
  *
5
- * <example>
6
- :deleteCookie.js
7
- it('should delete cookies', async () => {
8
- await browser.setCookies([
9
- {name: 'test', value: '123'},
10
- {name: 'test2', value: '456'},
11
- {name: 'test3', value: '789'}
12
- ])
13
-
14
- let cookies = await browser.getCookies()
15
- console.log(cookies)
16
- // outputs:
17
- // [
18
- // { name: 'test', value: '123' },
19
- // { name: 'test2', value: '456' }
20
- // { name: 'test3', value: '789' }
21
- // ]
22
-
23
- await browser.deleteCookies(['test3'])
24
- cookies = await browser.getCookies()
25
- console.log(cookies)
26
- // outputs:
27
- // [
28
- // { name: 'test', value: '123' },
29
- // { name: 'test2', value: '456' }
30
- // ]
31
-
32
- await browser.deleteCookies()
33
- cookies = await browser.getCookies()
34
- console.log(cookies) // outputs: []
35
- })
36
- * </example>
37
- *
38
5
  * @alias browser.deleteCookies
39
6
  * @param {String | String[]} names names of cookies to be deleted
40
7
  * @uses webdriver/deleteAllCookies,webdriver/deleteCookie
41
- * @type cookie
42
- *
8
+ * @example https://github.com/webdriverio/example-recipes/blob/e8b147e88e7a38351b0918b4f7efbd9ae292201d/deleteCookies/example.js#L9-L29
9
+ * @example https://github.com/webdriverio/example-recipes/blob/e8b147e88e7a38351b0918b4f7efbd9ae292201d/deleteCookies/example.js#L31-L35
43
10
  */
44
11
  export function deleteCookies(names) {
45
12
  if (names === undefined) {
@@ -14,24 +14,9 @@
14
14
  *
15
15
  * :::
16
16
  *
17
- * <example>
18
- :keys.js
19
- import { Key } from 'webdriverio'
20
-
21
- it('copies text out of active element', async () => {
22
- await $('#username').setValue('anonymous')
23
-
24
- // copies text from an input element
25
- await browser.keys([Key.Ctrl, 'a', 'c])
26
-
27
- // inserts text from clipboard into input element
28
- await $('#username').click() // make input active element
29
- await browser.keys([Key.Ctrl, 'v'])
30
- });
31
- * </example>
32
- *
33
17
  * @param {String|String[]} value The sequence of keys to type. An array or string must be provided.
34
18
  * @see https://w3c.github.io/webdriver/#dispatching-actions
19
+ * @example https://github.com/webdriverio/example-recipes/blob/355434bdef13d29608d6d5fbfbeaa034c8a2aa74/keys/keys.js#L1-L17
35
20
  *
36
21
  */
37
22
  export declare function keys(this: WebdriverIO.Browser, value: string | string[]): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/keys.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,IAAI,CAChB,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":"AAIA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,IAAI,CAChB,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,iBAiC3B"}
@@ -15,24 +15,9 @@ import { checkUnicode } from '../../utils/index.js';
15
15
  *
16
16
  * :::
17
17
  *
18
- * <example>
19
- :keys.js
20
- import { Key } from 'webdriverio'
21
-
22
- it('copies text out of active element', async () => {
23
- await $('#username').setValue('anonymous')
24
-
25
- // copies text from an input element
26
- await browser.keys([Key.Ctrl, 'a', 'c])
27
-
28
- // inserts text from clipboard into input element
29
- await $('#username').click() // make input active element
30
- await browser.keys([Key.Ctrl, 'v'])
31
- });
32
- * </example>
33
- *
34
18
  * @param {String|String[]} value The sequence of keys to type. An array or string must be provided.
35
19
  * @see https://w3c.github.io/webdriver/#dispatching-actions
20
+ * @example https://github.com/webdriverio/example-recipes/blob/355434bdef13d29608d6d5fbfbeaa034c8a2aa74/keys/keys.js#L1-L17
36
21
  *
37
22
  */
38
23
  export function keys(value) {
@@ -5,28 +5,6 @@ import type { WaitUntilOptions } from '../../types.js';
5
5
  *
6
6
  * A common example is to wait until a certain element contains a certain text (see example).
7
7
  *
8
- * <example>
9
- :example.html
10
- <div id="someText">I am some text</div>
11
- <script>
12
- setTimeout(() => {
13
- await $('#someText').html('I am now different');
14
- }, 1000);
15
- </script>
16
-
17
- :waitUntil.js
18
- it('should wait until text has changed', async () => {
19
- await browser.waitUntil(
20
- async () => (await $('#someText').getText()) === 'I am now different',
21
- {
22
- timeout: 5000,
23
- timeoutMsg: 'expected text to be different after 5s'
24
- }
25
- );
26
- });
27
- * </example>
28
- *
29
- *
30
8
  * @alias browser.waitUntil
31
9
  * @param {Function} condition condition to wait on until returning a truthy value
32
10
  * @param {WaitUntilOptions=} options command options
@@ -35,6 +13,8 @@ import type { WaitUntilOptions } from '../../types.js';
35
13
  * @param {Number=} options.interval interval between condition checks (default: 500)
36
14
  * @return {Boolean} true if condition is fulfilled
37
15
  * @uses utility/pause
16
+ * @example https://github.com/webdriverio/example-recipes/blob/0bfb2b8d212b627a2659b10f4449184b657e1d59/waitUntil/index.html#L3-L8
17
+ * @example https://github.com/webdriverio/example-recipes/blob/0bfb2b8d212b627a2659b10f4449184b657e1d59/waitUntil/waitUntilExample.js#L6-L14
38
18
  * @type utility
39
19
  *
40
20
  */
@@ -1 +1 @@
1
- {"version":3,"file":"waitUntil.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/waitUntil.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,SAAS,CAAC,WAAW,EACjC,IAAI,EAAE,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,EAC/C,SAAS,EAAE,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,EACnD,EACI,OAAqC,EACrC,QAAuC,EACvC,UAAU,EACb,GAAE,OAAO,CAAC,gBAAgB,CAAM,GAClC,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CA4BxC"}
1
+ {"version":3,"file":"waitUntil.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/waitUntil.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAEtD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,SAAS,CAAC,WAAW,EACjC,IAAI,EAAE,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,EAC/C,SAAS,EAAE,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,EACnD,EACI,OAAqC,EACrC,QAAuC,EACvC,UAAU,EACb,GAAE,OAAO,CAAC,gBAAgB,CAAM,GAClC,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CA4BxC"}
@@ -5,28 +5,6 @@ import Timer from '../../utils/Timer.js';
5
5
  *
6
6
  * A common example is to wait until a certain element contains a certain text (see example).
7
7
  *
8
- * <example>
9
- :example.html
10
- <div id="someText">I am some text</div>
11
- <script>
12
- setTimeout(() => {
13
- await $('#someText').html('I am now different');
14
- }, 1000);
15
- </script>
16
-
17
- :waitUntil.js
18
- it('should wait until text has changed', async () => {
19
- await browser.waitUntil(
20
- async () => (await $('#someText').getText()) === 'I am now different',
21
- {
22
- timeout: 5000,
23
- timeoutMsg: 'expected text to be different after 5s'
24
- }
25
- );
26
- });
27
- * </example>
28
- *
29
- *
30
8
  * @alias browser.waitUntil
31
9
  * @param {Function} condition condition to wait on until returning a truthy value
32
10
  * @param {WaitUntilOptions=} options command options
@@ -35,6 +13,8 @@ import Timer from '../../utils/Timer.js';
35
13
  * @param {Number=} options.interval interval between condition checks (default: 500)
36
14
  * @return {Boolean} true if condition is fulfilled
37
15
  * @uses utility/pause
16
+ * @example https://github.com/webdriverio/example-recipes/blob/0bfb2b8d212b627a2659b10f4449184b657e1d59/waitUntil/index.html#L3-L8
17
+ * @example https://github.com/webdriverio/example-recipes/blob/0bfb2b8d212b627a2659b10f4449184b657e1d59/waitUntil/waitUntilExample.js#L6-L14
38
18
  * @type utility
39
19
  *
40
20
  */
@@ -9,35 +9,13 @@
9
9
  *
10
10
  * :::
11
11
  *
12
- * <example>
13
- :index.html
14
- <ul id="menu">
15
- <li><a href="/">Home</a></li>
16
- <li><a href="/">Developer Guide</a></li>
17
- <li><a href="/">API</a></li>
18
- <li><a href="/">Contribute</a></li>
19
- </ul>
20
- :$.js
21
- it('should get text a menu link', async () => {
22
- const text = await $('#menu');
23
- console.log(await text.$$('li')[2].$('a').getText()); // outputs: "API"
24
- });
25
-
26
- it('should get text a menu link - JS Function', async () => {
27
- const text = await $('#menu');
28
- console.log(await text.$$(function() { // Arrow function is not allowed here.
29
- // this is Element https://developer.mozilla.org/en-US/docs/Web/API/Element
30
- // in this particular example it is HTMLUListElement
31
- // TypeScript users may do something like this
32
- // return (this as Element).querySelectorAll('li')
33
- return this.querySelectorAll('li'); // Element[]
34
- })[2].$('a').getText()); // outputs: "API"
35
- });
36
- * </example>
37
- *
38
12
  * @alias $$
39
13
  * @param {String|Function|Matcher} selector selector, JS Function, or Matcher object to fetch multiple elements
40
14
  * @return {ElementArray}
15
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/example.html
16
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/multipleElements.js#L6-L7
17
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/multipleElements.js#L15-L24
18
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/multipleElements.js#L32-L39
41
19
  * @type utility
42
20
  *
43
21
  */
@@ -1 +1 @@
1
- {"version":3,"file":"$$.d.ts","sourceRoot":"","sources":["../../../src/commands/element/$$.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,EAAE,EAAE,IAAI,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAClD,eAAO,MAAM,EAAE,kBAAY,CAAA"}
1
+ {"version":3,"file":"$$.d.ts","sourceRoot":"","sources":["../../../src/commands/element/$$.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAE,EAAE,IAAI,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAClD,eAAO,MAAM,EAAE,kBAAY,CAAA"}
@@ -9,35 +9,13 @@
9
9
  *
10
10
  * :::
11
11
  *
12
- * <example>
13
- :index.html
14
- <ul id="menu">
15
- <li><a href="/">Home</a></li>
16
- <li><a href="/">Developer Guide</a></li>
17
- <li><a href="/">API</a></li>
18
- <li><a href="/">Contribute</a></li>
19
- </ul>
20
- :$.js
21
- it('should get text a menu link', async () => {
22
- const text = await $('#menu');
23
- console.log(await text.$$('li')[2].$('a').getText()); // outputs: "API"
24
- });
25
-
26
- it('should get text a menu link - JS Function', async () => {
27
- const text = await $('#menu');
28
- console.log(await text.$$(function() { // Arrow function is not allowed here.
29
- // this is Element https://developer.mozilla.org/en-US/docs/Web/API/Element
30
- // in this particular example it is HTMLUListElement
31
- // TypeScript users may do something like this
32
- // return (this as Element).querySelectorAll('li')
33
- return this.querySelectorAll('li'); // Element[]
34
- })[2].$('a').getText()); // outputs: "API"
35
- });
36
- * </example>
37
- *
38
12
  * @alias $$
39
13
  * @param {String|Function|Matcher} selector selector, JS Function, or Matcher object to fetch multiple elements
40
14
  * @return {ElementArray}
15
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/example.html
16
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/multipleElements.js#L6-L7
17
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/multipleElements.js#L15-L24
18
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/multipleElements.js#L32-L39
41
19
  * @type utility
42
20
  *
43
21
  */
@@ -16,35 +16,7 @@
16
16
  * :::
17
17
  *
18
18
  * <example>
19
- :index.html
20
- <ul id="menu">
21
- <li><a href="/">Home</a></li>
22
- <li><a href="/">Developer Guide</a></li>
23
- <li><a href="/">API</a></li>
24
- <li><a href="/">Contribute</a></li>
25
- </ul>
26
19
  :$.js
27
- it('should get text a menu link', async () => {
28
- const text = await $('#menu');
29
- console.log(await text.$$('li')[2].$('a').getText()); // outputs: "API"
30
- });
31
-
32
- it('should get text a menu link - JS Function', async () => {
33
- const text = await $('#menu');
34
- console.log(await text.$$('li')[2].$(function() { // Arrow function is not allowed here.
35
- // this is Element https://developer.mozilla.org/en-US/docs/Web/API/Element
36
- // in this particular example it is HTMLLIElement
37
- // TypeScript users may do something like this
38
- // return (this as Element).querySelector('a')
39
- return this.querySelector('a'); // Element
40
- }).getText()); // outputs: "API"
41
- });
42
-
43
- it('should allow to convert protocol result of an element into a WebdriverIO element', async () => {
44
- const activeElement = await browser.getActiveElement();
45
- console.log(await $(activeElement).getTagName()); // outputs active element
46
- });
47
-
48
20
  it('should use Androids DataMatcher or ViewMatcher selector', async () => {
49
21
  const menuItem = await $({
50
22
  "name": "hasEntry",
@@ -64,6 +36,10 @@
64
36
  * @alias $
65
37
  * @param {String|Function|Matcher} selector selector, JS Function, or Matcher object to fetch a certain element
66
38
  * @return {Element}
39
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/example.html
40
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/singleElements.js#L9-L10
41
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/singleElements.js#L16-L25
42
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/singleElements.js#L42-L46
67
43
  * @type utility
68
44
  *
69
45
  */
@@ -1 +1 @@
1
- {"version":3,"file":"$.d.ts","sourceRoot":"","sources":["../../../src/commands/element/$.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,OAAO,EAAE,CAAC,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,eAAO,MAAM,CAAC,iBAAW,CAAA"}
1
+ {"version":3,"file":"$.d.ts","sourceRoot":"","sources":["../../../src/commands/element/$.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,EAAE,CAAC,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,eAAO,MAAM,CAAC,iBAAW,CAAA"}
@@ -16,35 +16,7 @@
16
16
  * :::
17
17
  *
18
18
  * <example>
19
- :index.html
20
- <ul id="menu">
21
- <li><a href="/">Home</a></li>
22
- <li><a href="/">Developer Guide</a></li>
23
- <li><a href="/">API</a></li>
24
- <li><a href="/">Contribute</a></li>
25
- </ul>
26
19
  :$.js
27
- it('should get text a menu link', async () => {
28
- const text = await $('#menu');
29
- console.log(await text.$$('li')[2].$('a').getText()); // outputs: "API"
30
- });
31
-
32
- it('should get text a menu link - JS Function', async () => {
33
- const text = await $('#menu');
34
- console.log(await text.$$('li')[2].$(function() { // Arrow function is not allowed here.
35
- // this is Element https://developer.mozilla.org/en-US/docs/Web/API/Element
36
- // in this particular example it is HTMLLIElement
37
- // TypeScript users may do something like this
38
- // return (this as Element).querySelector('a')
39
- return this.querySelector('a'); // Element
40
- }).getText()); // outputs: "API"
41
- });
42
-
43
- it('should allow to convert protocol result of an element into a WebdriverIO element', async () => {
44
- const activeElement = await browser.getActiveElement();
45
- console.log(await $(activeElement).getTagName()); // outputs active element
46
- });
47
-
48
20
  it('should use Androids DataMatcher or ViewMatcher selector', async () => {
49
21
  const menuItem = await $({
50
22
  "name": "hasEntry",
@@ -64,6 +36,10 @@
64
36
  * @alias $
65
37
  * @param {String|Function|Matcher} selector selector, JS Function, or Matcher object to fetch a certain element
66
38
  * @return {Element}
39
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/example.html
40
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/singleElements.js#L9-L10
41
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/singleElements.js#L16-L25
42
+ * @example https://github.com/webdriverio/example-recipes/blob/59c122c809d44d343c231bde2af7e8456c8f086c/queryElements/singleElements.js#L42-L46
67
43
  * @type utility
68
44
  *
69
45
  */
@@ -10,25 +10,6 @@ import type { WaitForOptions } from '../../types.js';
10
10
  *
11
11
  * :::
12
12
  *
13
- * <example>
14
- :index.html
15
- <div id="elem" style="visibility: hidden;">Hello World!</div>
16
- <script type="text/javascript">
17
- setTimeout(() => {
18
- document.getElementById('elem').style.visibility = 'visible';
19
- }, 2000);
20
- </script>
21
- :waitForDisplayedExample.js
22
- it('should detect when element is visible', async () => {
23
- const elem = await $('#elem')
24
- await elem.waitForDisplayed({ timeout: 3000 });
25
- });
26
- it('should detect when element is no longer visible', async () => {
27
- const elem = await $('#elem')
28
- await elem.waitForDisplayed({ reverse: true });
29
- });
30
- * </example>
31
- *
32
13
  * @alias element.waitForDisplayed
33
14
  * @param {WaitForOptions=} options waitForEnabled options (optional)
34
15
  * @param {Number=} options.timeout time in ms (default: 500)
@@ -37,8 +18,9 @@ import type { WaitForOptions } from '../../types.js';
37
18
  * @param {Number=} options.interval interval between checks (default: `waitforInterval`)
38
19
  * @return {Boolean} true if element is displayed (or doesn't if flag is set)
39
20
  * @uses utility/waitUntil, state/isDisplayed
21
+ * @example https://github.com/webdriverio/example-recipes/blob/0bfb2b8d212b627a2659b10f4449184b657e1d59/waitForDisplayed/index.html#L3-L8
22
+ * @example https://github.com/webdriverio/example-recipes/blob/9ac16b4d4cf4bc8ec87f6369439a2d0bcaae4483/waitForDisplayed/waitForDisplayedExample.js#L6-L14
40
23
  * @type utility
41
- *
42
24
  */
43
25
  export declare function waitForDisplayed(this: WebdriverIO.Element, { timeout, interval, reverse, timeoutMsg }?: WaitForOptions): Promise<never>;
44
26
  //# sourceMappingURL=waitForDisplayed.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"waitForDisplayed.d.ts","sourceRoot":"","sources":["../../../src/commands/element/waitForDisplayed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAsB,gBAAgB,CAClC,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,EACI,OAAqC,EACrC,QAAuC,EACvC,OAAe,EACf,UAAsG,EACzG,GAAE,cAAmB,kBAMzB"}
1
+ {"version":3,"file":"waitForDisplayed.d.ts","sourceRoot":"","sources":["../../../src/commands/element/waitForDisplayed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAEpD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,gBAAgB,CAClC,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,EACI,OAAqC,EACrC,QAAuC,EACvC,OAAe,EACf,UAAsG,EACzG,GAAE,cAAmB,kBAMzB"}
@@ -9,25 +9,6 @@
9
9
  *
10
10
  * :::
11
11
  *
12
- * <example>
13
- :index.html
14
- <div id="elem" style="visibility: hidden;">Hello World!</div>
15
- <script type="text/javascript">
16
- setTimeout(() => {
17
- document.getElementById('elem').style.visibility = 'visible';
18
- }, 2000);
19
- </script>
20
- :waitForDisplayedExample.js
21
- it('should detect when element is visible', async () => {
22
- const elem = await $('#elem')
23
- await elem.waitForDisplayed({ timeout: 3000 });
24
- });
25
- it('should detect when element is no longer visible', async () => {
26
- const elem = await $('#elem')
27
- await elem.waitForDisplayed({ reverse: true });
28
- });
29
- * </example>
30
- *
31
12
  * @alias element.waitForDisplayed
32
13
  * @param {WaitForOptions=} options waitForEnabled options (optional)
33
14
  * @param {Number=} options.timeout time in ms (default: 500)
@@ -36,8 +17,9 @@
36
17
  * @param {Number=} options.interval interval between checks (default: `waitforInterval`)
37
18
  * @return {Boolean} true if element is displayed (or doesn't if flag is set)
38
19
  * @uses utility/waitUntil, state/isDisplayed
20
+ * @example https://github.com/webdriverio/example-recipes/blob/0bfb2b8d212b627a2659b10f4449184b657e1d59/waitForDisplayed/index.html#L3-L8
21
+ * @example https://github.com/webdriverio/example-recipes/blob/9ac16b4d4cf4bc8ec87f6369439a2d0bcaae4483/waitForDisplayed/waitForDisplayedExample.js#L6-L14
39
22
  * @type utility
40
- *
41
23
  */
42
24
  export async function waitForDisplayed({ timeout = this.options.waitforTimeout, interval = this.options.waitforInterval, reverse = false, timeoutMsg = `element ("${this.selector}") still ${reverse ? '' : 'not '}displayed after ${timeout}ms` } = {}) {
43
25
  return this.waitUntil(async () => reverse !== await this.isDisplayed(), { timeout, interval, timeoutMsg });
@@ -12,27 +12,6 @@
12
12
  *
13
13
  * A common example is to wait until a certain element contains a certain text (see example).
14
14
  *
15
- * <example>
16
- :example.html
17
- <div id="someText">I am some text</div>
18
- <script>
19
- setTimeout(() => {
20
- await $('#someText').html('I am now different');
21
- }, 1000);
22
- </script>
23
-
24
- :waitUntil.js
25
- it('should wait until text has changed', async () => {
26
- const elem = await $('#someText')
27
- await elem.waitUntil(async function () {
28
- return (await this.getText()) === 'I am now different'
29
- }, {
30
- timeout: 5000,
31
- timeoutMsg: 'expected text to be different after 5s'
32
- });
33
- });
34
- * </example>
35
- *
36
15
  * @alias element.waitUntil
37
16
  * @param {Function#Boolean} condition condition to wait on
38
17
  * @param {WaitUntilOptions=} options command options
@@ -40,6 +19,8 @@
40
19
  * @param {String=} options.timeoutMsg error message to throw when waitUntil times out
41
20
  * @param {Number=} options.interval interval between condition checks (default: 500)
42
21
  * @return {Boolean} true if condition is fulfilled
22
+ * @example https://github.com/webdriverio/example-recipes/blob/0bfb2b8d212b627a2659b10f4449184b657e1d59/waitUntil/index.html#L3-L8
23
+ * @example https://github.com/webdriverio/example-recipes/blob/0bfb2b8d212b627a2659b10f4449184b657e1d59/waitUntil/waitUntilExample.js#L6-L14
43
24
  * @type utility
44
25
  *
45
26
  */
@@ -1 +1 @@
1
- {"version":3,"file":"waitUntil.d.ts","sourceRoot":"","sources":["../../../src/commands/element/waitUntil.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AACvE,eAAO,MAAM,SAAS,yBAAmB,CAAA"}
1
+ {"version":3,"file":"waitUntil.d.ts","sourceRoot":"","sources":["../../../src/commands/element/waitUntil.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AACvE,eAAO,MAAM,SAAS,yBAAmB,CAAA"}
@@ -12,27 +12,6 @@
12
12
  *
13
13
  * A common example is to wait until a certain element contains a certain text (see example).
14
14
  *
15
- * <example>
16
- :example.html
17
- <div id="someText">I am some text</div>
18
- <script>
19
- setTimeout(() => {
20
- await $('#someText').html('I am now different');
21
- }, 1000);
22
- </script>
23
-
24
- :waitUntil.js
25
- it('should wait until text has changed', async () => {
26
- const elem = await $('#someText')
27
- await elem.waitUntil(async function () {
28
- return (await this.getText()) === 'I am now different'
29
- }, {
30
- timeout: 5000,
31
- timeoutMsg: 'expected text to be different after 5s'
32
- });
33
- });
34
- * </example>
35
- *
36
15
  * @alias element.waitUntil
37
16
  * @param {Function#Boolean} condition condition to wait on
38
17
  * @param {WaitUntilOptions=} options command options
@@ -40,6 +19,8 @@
40
19
  * @param {String=} options.timeoutMsg error message to throw when waitUntil times out
41
20
  * @param {Number=} options.interval interval between condition checks (default: 500)
42
21
  * @return {Boolean} true if condition is fulfilled
22
+ * @example https://github.com/webdriverio/example-recipes/blob/0bfb2b8d212b627a2659b10f4449184b657e1d59/waitUntil/index.html#L3-L8
23
+ * @example https://github.com/webdriverio/example-recipes/blob/0bfb2b8d212b627a2659b10f4449184b657e1d59/waitUntil/waitUntilExample.js#L6-L14
43
24
  * @type utility
44
25
  *
45
26
  */
@@ -28,7 +28,7 @@ declare const MOVE_PARAM_DEFAULTS: {
28
28
  x: number;
29
29
  y: number;
30
30
  duration: number;
31
- origin: WebdriverIO.Element | ElementReference | Element | Origin | ChainablePromiseElement<Element>;
31
+ origin: WebdriverIO.Element | ElementReference | ChainablePromiseElement<WebdriverIO.Element> | Origin;
32
32
  };
33
33
  type PointerActionParams = Partial<typeof PARAM_DEFAULTS> & Partial<PointerActionUpParams>;
34
34
  type PointerActionMoveParams = Partial<typeof MOVE_PARAM_DEFAULTS> & PointerActionParams;
@@ -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,aAAa,CAAA;AAOpH,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QAAG,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;KAAE;CACnE;AAiBD;;GAEG;AACH,eAAO,MAAM,YAAY,UAAW,SAAS,GAAG,SAAS,uCAexD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,QAAS,gBAAgB,kBAuB3D,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,CAAE,KAAK,EAAE,MAAM,EAAE,UAAU,UAAQ,YAc9D;AAmBD,wBAAgB,SAAS,CAAE,CAAC,EAAE,QAAQ,gBAMrC;AAED;;GAEG;AACH,wBAAsB,WAAW,CAC7B,IAAI,EAAE,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,OA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O,MAAM,EAAE,MAAM,CAAC,SACrB,OAAO,MAAM,EAAE,MAAM,CAAC,YAShC,CAAA"}
@@ -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 } from '../constants.js';
15
+ import { ELEMENT_KEY, DRIVER_DEFAULT_ENDPOINT, DEEP_SELECTOR, Key } 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`';
@@ -144,6 +144,12 @@ export function parseCSS(cssPropertyValue, cssProperty) {
144
144
  * @return {Array} set of characters or unicode symbols
145
145
  */
146
146
  export function checkUnicode(value, isDevTools = false) {
147
+ /**
148
+ * "Ctrl" key is specially handled based on OS in action class
149
+ */
150
+ if (value === Key.Ctrl) {
151
+ return [value];
152
+ }
147
153
  /**
148
154
  * when sending emoji characters like 😄 or a value that is not a special character defined
149
155
  * 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.3.10",
4
+ "version": "8.4.0",
5
5
  "homepage": "https://webdriver.io",
6
6
  "author": "Christian Bromann <mail@bromann.dev>",
7
7
  "license": "MIT",
@@ -67,30 +67,30 @@
67
67
  },
68
68
  "dependencies": {
69
69
  "@types/node": "^18.0.0",
70
- "@wdio/config": "8.3.2",
70
+ "@wdio/config": "8.4.0",
71
71
  "@wdio/logger": "8.1.0",
72
- "@wdio/protocols": "8.3.5",
72
+ "@wdio/protocols": "8.3.11",
73
73
  "@wdio/repl": "8.1.0",
74
- "@wdio/types": "8.3.0",
75
- "@wdio/utils": "8.3.0",
74
+ "@wdio/types": "8.4.0",
75
+ "@wdio/utils": "8.4.0",
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.3.8",
81
- "devtools-protocol": "^0.0.1103684",
80
+ "devtools": "8.4.0",
81
+ "devtools-protocol": "^0.0.1109433",
82
82
  "grapheme-splitter": "^1.0.2",
83
83
  "import-meta-resolve": "^2.1.0",
84
84
  "is-plain-obj": "^4.1.0",
85
85
  "lodash.clonedeep": "^4.5.0",
86
86
  "lodash.zip": "^4.2.0",
87
- "minimatch": "^6.1.4",
88
- "puppeteer-core": "19.6.3",
87
+ "minimatch": "^7.0.0",
88
+ "puppeteer-core": "19.7.2",
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.3.8"
93
+ "webdriver": "8.4.0"
94
94
  },
95
- "gitHead": "5135fb86e53dcbfca0a5935eda4b44aa3ca46dc2"
95
+ "gitHead": "5d003ce35250c9d9dcecc9fd13a97257d6b349fe"
96
96
  }