@wdio/protocols 7.16.0 → 7.17.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.
- package/build/commands/webdriver.d.ts +53 -1
- package/build/commands/webdriver.d.ts.map +1 -1
- package/build/index.js +5 -1
- package/build/types.d.ts +1 -1
- package/build/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/protocols/webdriver.json +106 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SessionReturn, StatusReturn, Timeouts, WindowHandle, RectReturn, ElementReference,
|
|
1
|
+
import { SessionReturn, StatusReturn, Timeouts, WindowHandle, RectReturn, ElementReference, ProtocolCommandResponse, Cookie } from '../types';
|
|
2
2
|
export default interface WebdriverCommands {
|
|
3
3
|
/**
|
|
4
4
|
* Webdriver Protocol Command
|
|
@@ -207,6 +207,28 @@ export default interface WebdriverCommands {
|
|
|
207
207
|
* ```
|
|
208
208
|
*/
|
|
209
209
|
findElement(using: string, value: string): ElementReference;
|
|
210
|
+
/**
|
|
211
|
+
* Webdriver Protocol Command
|
|
212
|
+
*
|
|
213
|
+
* The Find Element From Shadow Root command is used to find an element within the shadow root of an element that can be used for future commands. This command returns JSON representation of the element that can be passed to $ command to transform the reference to an extended WebdriverIO element.
|
|
214
|
+
* @ref https://w3c.github.io/webdriver/#find-element-from-shadow-root
|
|
215
|
+
*
|
|
216
|
+
* @example
|
|
217
|
+
* ```js
|
|
218
|
+
* // get shadow root
|
|
219
|
+
* const element = await browser.findElement('xpath', '//div')
|
|
220
|
+
* const shadowRoot = await browser.getElementShadowRoot(
|
|
221
|
+
* element['element-6066-11e4-a52e-4f735466cecf']
|
|
222
|
+
* )
|
|
223
|
+
* // fetch element within that shadow root
|
|
224
|
+
* const elementRef = await browser.findElementFromShadowRoot(
|
|
225
|
+
* shadowRoot['shadow-6066-11e4-a52e-4f735466cecf'],
|
|
226
|
+
* 'xpath',
|
|
227
|
+
* '//div'
|
|
228
|
+
* )
|
|
229
|
+
* ```
|
|
230
|
+
*/
|
|
231
|
+
findElementFromShadowRoot(shadowId: string, using: string, value: string): ProtocolCommandResponse;
|
|
210
232
|
/**
|
|
211
233
|
* Webdriver Protocol Command
|
|
212
234
|
*
|
|
@@ -215,6 +237,28 @@ export default interface WebdriverCommands {
|
|
|
215
237
|
*
|
|
216
238
|
*/
|
|
217
239
|
findElements(using: string, value: string): ElementReference[];
|
|
240
|
+
/**
|
|
241
|
+
* Webdriver Protocol Command
|
|
242
|
+
*
|
|
243
|
+
* The Find Elements command is used to find elements within the shadow root of an element that can be used for future commands. This command returns array of JSON representation of the elements that can be passed to $ command to transform the reference to an extended WebdriverIO element (See findElement).
|
|
244
|
+
* @ref https://w3c.github.io/webdriver/#find-elements-from-shadow-root
|
|
245
|
+
*
|
|
246
|
+
* @example
|
|
247
|
+
* ```js
|
|
248
|
+
* // get shadow root
|
|
249
|
+
* const element = await browser.findElement('xpath', '//div')
|
|
250
|
+
* const shadowRoot = await browser.getElementShadowRoot(
|
|
251
|
+
* element['element-6066-11e4-a52e-4f735466cecf']
|
|
252
|
+
* )
|
|
253
|
+
* // fetch elements within that shadow root
|
|
254
|
+
* const elementRef = await browser.findElementsFromShadowRoot(
|
|
255
|
+
* shadowRoot['shadow-6066-11e4-a52e-4f735466cecf'],
|
|
256
|
+
* 'xpath',
|
|
257
|
+
* '//div'
|
|
258
|
+
* )
|
|
259
|
+
* ```
|
|
260
|
+
*/
|
|
261
|
+
findElementsFromShadowRoot(shadowId: string, using: string, value: string): object[];
|
|
218
262
|
/**
|
|
219
263
|
* Webdriver Protocol Command
|
|
220
264
|
*
|
|
@@ -231,6 +275,14 @@ export default interface WebdriverCommands {
|
|
|
231
275
|
*
|
|
232
276
|
*/
|
|
233
277
|
findElementsFromElement(elementId: string, using: string, value: string): ElementReference[];
|
|
278
|
+
/**
|
|
279
|
+
* Webdriver Protocol Command
|
|
280
|
+
*
|
|
281
|
+
* Get the shadow root object of an element. The result object can be used to fetch elements within this shadow root using e.g. findElementFromShadowRoots or findElementsFromShadowRoots.
|
|
282
|
+
* @ref https://w3c.github.io/webdriver/#dfn-get-active-element
|
|
283
|
+
*
|
|
284
|
+
*/
|
|
285
|
+
getElementShadowRoot(elementId: string): string;
|
|
234
286
|
/**
|
|
235
287
|
* Webdriver Protocol Command
|
|
236
288
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webdriver.d.ts","sourceRoot":"","sources":["../../src/commands/webdriver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"webdriver.d.ts","sourceRoot":"","sources":["../../src/commands/webdriver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAG7I,MAAM,CAAC,OAAO,WAAW,iBAAiB;IAEtC;;;;;;OAMG;IACH,UAAU,CAAC,YAAY,EAAE,MAAM,GAAG,aAAa,CAAC;IAEhD;;;;;;OAMG;IACH,aAAa,IAAI,IAAI,CAAC;IAEtB;;;;;;OAMG;IACH,MAAM,IAAI,YAAY,CAAC;IAEvB;;;;;;OAMG;IACH,WAAW,IAAI,QAAQ,CAAC;IAExB;;;;;;OAMG;IACH,WAAW,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzE;;;;;;OAMG;IACH,MAAM,IAAI,MAAM,CAAC;IAEjB;;;;;;OAMG;IACH,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IAEhC;;;;;;OAMG;IACH,IAAI,IAAI,IAAI,CAAC;IAEb;;;;;;OAMG;IACH,OAAO,IAAI,IAAI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IAAI,CAAC;IAEtE;;;;;;OAMG;IACH,eAAe,CAAC,eAAe,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CACxE"}
|
package/build/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/build/types.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export interface Timeouts {
|
|
|
45
45
|
pageLoad?: number;
|
|
46
46
|
script?: number;
|
|
47
47
|
}
|
|
48
|
-
export declare type SameSiteOptions = 'Lax' | 'Strict';
|
|
48
|
+
export declare type SameSiteOptions = 'Lax' | 'Strict' | 'None';
|
|
49
49
|
export interface Cookie {
|
|
50
50
|
/**
|
|
51
51
|
* The name of the cookie.
|
package/build/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,uBAAuB;IACpC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAGD,MAAM,WAAW,aAAc,SAAQ,0BAA0B,CAAC,uBAAuB;CAAI;AAE7F,MAAM,WAAW,YAAa,SAAQ,uBAAuB;IACzD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,oBAAY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U,EAAE,iBAAiB,EAAE,CAAA;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,oBAAoB,EAAE,CAAA;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE,qBAAqB,CAAA;IAC/B;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAChC;AAED,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAA;CACpB;AAED,oBAAY,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAA;AACxC,oBAAY,YAAY,GAAG,UAAU,GAAG,cAAc,GAAG,aAAa,CAAA;AAEtE;;;;;;;GAOG;AACH,oBAAY,qBAAqB,GAAG,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/protocols",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.17.3",
|
|
4
4
|
"description": "Utility package providing information about automation protocols",
|
|
5
5
|
"author": "Christian Bromann <christian@saucelabs.com>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-protocols",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "2bcb589dbdd10ca181f301a269b4dd158faab257"
|
|
28
28
|
}
|
package/protocols/webdriver.json
CHANGED
|
@@ -398,7 +398,49 @@
|
|
|
398
398
|
"returns": {
|
|
399
399
|
"type": "object",
|
|
400
400
|
"name": "element",
|
|
401
|
-
"description": "A JSON representation of an element object."
|
|
401
|
+
"description": "A JSON representation of an element object, e.g. `{ 'element-6066-11e4-a52e-4f735466cecf': 'ELEMENT_1' }`."
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
"/session/:sessionId/shadow/:shadowId/element": {
|
|
406
|
+
"POST": {
|
|
407
|
+
"command": "findElementFromShadowRoot",
|
|
408
|
+
"description": "The Find Element From Shadow Root command is used to find an element within the shadow root of an element that can be used for future commands. This command returns JSON representation of the element that can be passed to $ command to transform the reference to an extended WebdriverIO element.",
|
|
409
|
+
"ref": "https://w3c.github.io/webdriver/#find-element-from-shadow-root",
|
|
410
|
+
"examples": [
|
|
411
|
+
[
|
|
412
|
+
"// get shadow root",
|
|
413
|
+
"const element = await browser.findElement('xpath', '//div')",
|
|
414
|
+
"const shadowRoot = await browser.getElementShadowRoot(",
|
|
415
|
+
" element['element-6066-11e4-a52e-4f735466cecf']",
|
|
416
|
+
")",
|
|
417
|
+
"// fetch element within that shadow root",
|
|
418
|
+
"const elementRef = await browser.findElementFromShadowRoot(",
|
|
419
|
+
" shadowRoot['shadow-6066-11e4-a52e-4f735466cecf'],",
|
|
420
|
+
" 'xpath',",
|
|
421
|
+
" '//div'",
|
|
422
|
+
")"
|
|
423
|
+
]
|
|
424
|
+
],
|
|
425
|
+
"variables": [{
|
|
426
|
+
"name": "shadowId",
|
|
427
|
+
"description": "element id of a shadow root element"
|
|
428
|
+
}],
|
|
429
|
+
"parameters": [{
|
|
430
|
+
"name": "using",
|
|
431
|
+
"type": "string",
|
|
432
|
+
"description": "a valid element location strategy",
|
|
433
|
+
"required": true
|
|
434
|
+
}, {
|
|
435
|
+
"name": "value",
|
|
436
|
+
"type": "string",
|
|
437
|
+
"description": "the actual selector that will be used to find an element",
|
|
438
|
+
"required": true
|
|
439
|
+
}],
|
|
440
|
+
"returns": {
|
|
441
|
+
"type": "object",
|
|
442
|
+
"name": "element",
|
|
443
|
+
"description": "A JSON representation of an element shadow object, e.g. `{ 'element-6066-11e4-a52e-4f735466cecf': 'ELEMENT_1' }`."
|
|
402
444
|
}
|
|
403
445
|
}
|
|
404
446
|
},
|
|
@@ -421,7 +463,49 @@
|
|
|
421
463
|
"returns": {
|
|
422
464
|
"type": "object[]",
|
|
423
465
|
"name": "elements",
|
|
424
|
-
"description": "A (possibly empty) JSON list of representations of an element object."
|
|
466
|
+
"description": "A (possibly empty) JSON list of representations of an element object, e.g. `[{ 'element-6066-11e4-a52e-4f735466cecf': 'ELEMENT_1' }]`."
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
"/session/:sessionId/shadow/:shadowId/elements": {
|
|
471
|
+
"POST": {
|
|
472
|
+
"command": "findElementsFromShadowRoot",
|
|
473
|
+
"description": "The Find Elements command is used to find elements within the shadow root of an element that can be used for future commands. This command returns array of JSON representation of the elements that can be passed to $ command to transform the reference to an extended WebdriverIO element (See findElement).",
|
|
474
|
+
"ref": "https://w3c.github.io/webdriver/#find-elements-from-shadow-root",
|
|
475
|
+
"variables": [{
|
|
476
|
+
"name": "shadowId",
|
|
477
|
+
"description": "element id of a shadow root element"
|
|
478
|
+
}],
|
|
479
|
+
"parameters": [{
|
|
480
|
+
"name": "using",
|
|
481
|
+
"type": "string",
|
|
482
|
+
"description": "a valid element location strategy",
|
|
483
|
+
"required": true
|
|
484
|
+
}, {
|
|
485
|
+
"name": "value",
|
|
486
|
+
"type": "string",
|
|
487
|
+
"description": "the actual selector that will be used to find an element",
|
|
488
|
+
"required": true
|
|
489
|
+
}],
|
|
490
|
+
"examples": [
|
|
491
|
+
[
|
|
492
|
+
"// get shadow root",
|
|
493
|
+
"const element = await browser.findElement('xpath', '//div')",
|
|
494
|
+
"const shadowRoot = await browser.getElementShadowRoot(",
|
|
495
|
+
" element['element-6066-11e4-a52e-4f735466cecf']",
|
|
496
|
+
")",
|
|
497
|
+
"// fetch elements within that shadow root",
|
|
498
|
+
"const elementRef = await browser.findElementsFromShadowRoot(",
|
|
499
|
+
" shadowRoot['shadow-6066-11e4-a52e-4f735466cecf'],",
|
|
500
|
+
" 'xpath',",
|
|
501
|
+
" '//div'",
|
|
502
|
+
")"
|
|
503
|
+
]
|
|
504
|
+
],
|
|
505
|
+
"returns": {
|
|
506
|
+
"type": "object[]",
|
|
507
|
+
"name": "elements",
|
|
508
|
+
"description": "A (possibly empty) JSON list of representations of an element object, e.g. `{ 'element-6066-11e4-a52e-4f735466cecf': 'ELEMENT_1' }`."
|
|
425
509
|
}
|
|
426
510
|
}
|
|
427
511
|
},
|
|
@@ -448,7 +532,7 @@
|
|
|
448
532
|
"returns": {
|
|
449
533
|
"type": "object",
|
|
450
534
|
"name": "element",
|
|
451
|
-
"description": "A JSON representation of an element object."
|
|
535
|
+
"description": "A JSON representation of an element object, e.g. `{ 'element-6066-11e4-a52e-4f735466cecf': 'ELEMENT_1' }`."
|
|
452
536
|
}
|
|
453
537
|
}
|
|
454
538
|
},
|
|
@@ -475,7 +559,24 @@
|
|
|
475
559
|
"returns": {
|
|
476
560
|
"type": "object[]",
|
|
477
561
|
"name": "elements",
|
|
478
|
-
"description": "A (possibly empty) JSON list of representations of an element object."
|
|
562
|
+
"description": "A (possibly empty) JSON list of representations of an element object, e.g. `[{ 'element-6066-11e4-a52e-4f735466cecf': 'ELEMENT_1' }]`."
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
},
|
|
566
|
+
"/session/:sessionId/element/:elementId/shadow": {
|
|
567
|
+
"GET": {
|
|
568
|
+
"command": "getElementShadowRoot",
|
|
569
|
+
"description": "Get the shadow root object of an element. The result object can be used to fetch elements within this shadow root using e.g. findElementFromShadowRoots or findElementsFromShadowRoots.",
|
|
570
|
+
"ref": "https://w3c.github.io/webdriver/#dfn-get-active-element",
|
|
571
|
+
"variables": [{
|
|
572
|
+
"name": "elementId",
|
|
573
|
+
"description": "the id of an element returned in a previous call to Find Element(s)"
|
|
574
|
+
}],
|
|
575
|
+
"parameters": [],
|
|
576
|
+
"returns": {
|
|
577
|
+
"type": "string",
|
|
578
|
+
"name": "element",
|
|
579
|
+
"description": "A JSON representation of an element shadow root, e.g. `{ 'shadow-6066-11e4-a52e-4f735466cecf': 'ELEMENT_1' }`."
|
|
479
580
|
}
|
|
480
581
|
}
|
|
481
582
|
},
|
|
@@ -488,7 +589,7 @@
|
|
|
488
589
|
"returns": {
|
|
489
590
|
"type": "string",
|
|
490
591
|
"name": "element",
|
|
491
|
-
"description": "A JSON representation of an element object."
|
|
592
|
+
"description": "A JSON representation of an element object, e.g. `{ 'element-6066-11e4-a52e-4f735466cecf': 'ELEMENT_1' }`."
|
|
492
593
|
}
|
|
493
594
|
}
|
|
494
595
|
},
|