@serenity-js/webdriverio 2.33.1 → 3.0.0-rc.11
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/CHANGELOG.md +455 -0
- package/lib/adapter/WebdriverIOFrameworkAdapter.js +1 -1
- package/lib/adapter/WebdriverIOFrameworkAdapter.js.map +1 -1
- package/lib/adapter/WebdriverIONotifier.d.ts +35 -1
- package/lib/adapter/WebdriverIONotifier.js +174 -13
- package/lib/adapter/WebdriverIONotifier.js.map +1 -1
- package/lib/index.d.ts +0 -3
- package/lib/index.js +0 -3
- package/lib/index.js.map +1 -1
- package/lib/screenplay/abilities/{BrowseTheWeb.d.ts → BrowseTheWebWithWebdriverIO.d.ts} +42 -27
- package/lib/screenplay/abilities/{BrowseTheWeb.js → BrowseTheWebWithWebdriverIO.js} +104 -32
- package/lib/screenplay/abilities/BrowseTheWebWithWebdriverIO.js.map +1 -0
- package/lib/screenplay/abilities/index.d.ts +1 -1
- package/lib/screenplay/abilities/index.js +1 -1
- package/lib/screenplay/abilities/index.js.map +1 -1
- package/lib/screenplay/index.d.ts +1 -2
- package/lib/screenplay/index.js +1 -2
- package/lib/screenplay/index.js.map +1 -1
- package/lib/screenplay/models/WebdriverIOCookie.d.ts +8 -0
- package/lib/screenplay/models/WebdriverIOCookie.js +39 -0
- package/lib/screenplay/models/WebdriverIOCookie.js.map +1 -0
- package/lib/screenplay/models/WebdriverIOFrame.d.ts +10 -0
- package/lib/screenplay/models/WebdriverIOFrame.js +34 -0
- package/lib/screenplay/models/WebdriverIOFrame.js.map +1 -0
- package/lib/screenplay/models/WebdriverIOModalDialog.d.ts +11 -0
- package/lib/screenplay/models/WebdriverIOModalDialog.js +40 -0
- package/lib/screenplay/models/WebdriverIOModalDialog.js.map +1 -0
- package/lib/screenplay/models/WebdriverIOPage.d.ts +26 -0
- package/lib/screenplay/models/WebdriverIOPage.js +104 -0
- package/lib/screenplay/models/WebdriverIOPage.js.map +1 -0
- package/lib/screenplay/models/WebdriverIOPageElement.d.ts +31 -0
- package/lib/screenplay/models/WebdriverIOPageElement.js +185 -0
- package/lib/screenplay/models/WebdriverIOPageElement.js.map +1 -0
- package/lib/screenplay/models/index.d.ts +5 -0
- package/lib/{stage/crew/photographer/strategies → screenplay/models}/index.js +5 -4
- package/lib/screenplay/models/index.js.map +1 -0
- package/lib/screenplay/models/locators/WebdriverIOLocator.d.ts +9 -0
- package/lib/screenplay/models/locators/WebdriverIOLocator.js +22 -0
- package/lib/screenplay/models/locators/WebdriverIOLocator.js.map +1 -0
- package/lib/screenplay/models/locators/WebdriverIONativeElementRoot.d.ts +2 -0
- package/lib/screenplay/{interactions/EnterBuilder.js → models/locators/WebdriverIONativeElementRoot.js} +1 -1
- package/lib/screenplay/models/locators/WebdriverIONativeElementRoot.js.map +1 -0
- package/lib/screenplay/models/locators/index.d.ts +2 -0
- package/lib/{stage/crew/photographer → screenplay/models/locators}/index.js +2 -2
- package/lib/screenplay/models/locators/index.js.map +1 -0
- package/package.json +14 -24
- package/src/adapter/WebdriverIOFrameworkAdapter.ts +2 -0
- package/src/adapter/WebdriverIONotifier.ts +225 -23
- package/src/index.ts +0 -3
- package/src/screenplay/abilities/{BrowseTheWeb.ts → BrowseTheWebWithWebdriverIO.ts} +125 -35
- package/src/screenplay/abilities/index.ts +1 -1
- package/src/screenplay/index.ts +1 -2
- package/src/screenplay/models/WebdriverIOCookie.ts +44 -0
- package/src/screenplay/models/WebdriverIOFrame.ts +38 -0
- package/src/screenplay/models/WebdriverIOModalDialog.ts +45 -0
- package/src/screenplay/models/WebdriverIOPage.ts +128 -0
- package/src/screenplay/models/WebdriverIOPageElement.ts +227 -0
- package/src/screenplay/models/index.ts +5 -0
- package/src/screenplay/models/locators/WebdriverIOLocator.ts +43 -0
- package/src/screenplay/models/locators/WebdriverIONativeElementRoot.ts +3 -0
- package/src/screenplay/models/locators/index.ts +2 -0
- package/lib/expectations/ElementExpectation.d.ts +0 -11
- package/lib/expectations/ElementExpectation.js +0 -27
- package/lib/expectations/ElementExpectation.js.map +0 -1
- package/lib/expectations/index.d.ts +0 -6
- package/lib/expectations/index.js +0 -19
- package/lib/expectations/index.js.map +0 -1
- package/lib/expectations/isActive.d.ts +0 -15
- package/lib/expectations/isActive.js +0 -21
- package/lib/expectations/isActive.js.map +0 -1
- package/lib/expectations/isClickable.d.ts +0 -20
- package/lib/expectations/isClickable.js +0 -26
- package/lib/expectations/isClickable.js.map +0 -1
- package/lib/expectations/isEnabled.d.ts +0 -14
- package/lib/expectations/isEnabled.js +0 -20
- package/lib/expectations/isEnabled.js.map +0 -1
- package/lib/expectations/isPresent.d.ts +0 -15
- package/lib/expectations/isPresent.js +0 -21
- package/lib/expectations/isPresent.js.map +0 -1
- package/lib/expectations/isSelected.d.ts +0 -14
- package/lib/expectations/isSelected.js +0 -20
- package/lib/expectations/isSelected.js.map +0 -1
- package/lib/expectations/isVisible.d.ts +0 -14
- package/lib/expectations/isVisible.js +0 -20
- package/lib/expectations/isVisible.js.map +0 -1
- package/lib/input/Key.d.ts +0 -73
- package/lib/input/Key.js +0 -84
- package/lib/input/Key.js.map +0 -1
- package/lib/input/index.d.ts +0 -1
- package/lib/input/index.js +0 -14
- package/lib/input/index.js.map +0 -1
- package/lib/screenplay/abilities/BrowseTheWeb.js.map +0 -1
- package/lib/screenplay/interactions/Clear.d.ts +0 -79
- package/lib/screenplay/interactions/Clear.js +0 -97
- package/lib/screenplay/interactions/Clear.js.map +0 -1
- package/lib/screenplay/interactions/Click.d.ts +0 -73
- package/lib/screenplay/interactions/Click.js +0 -84
- package/lib/screenplay/interactions/Click.js.map +0 -1
- package/lib/screenplay/interactions/DoubleClick.d.ts +0 -90
- package/lib/screenplay/interactions/DoubleClick.js +0 -101
- package/lib/screenplay/interactions/DoubleClick.js.map +0 -1
- package/lib/screenplay/interactions/Enter.d.ts +0 -73
- package/lib/screenplay/interactions/Enter.js +0 -87
- package/lib/screenplay/interactions/Enter.js.map +0 -1
- package/lib/screenplay/interactions/EnterBuilder.d.ts +0 -25
- package/lib/screenplay/interactions/EnterBuilder.js.map +0 -1
- package/lib/screenplay/interactions/ExecuteScript.d.ts +0 -206
- package/lib/screenplay/interactions/ExecuteScript.js +0 -311
- package/lib/screenplay/interactions/ExecuteScript.js.map +0 -1
- package/lib/screenplay/interactions/Hover.d.ts +0 -78
- package/lib/screenplay/interactions/Hover.js +0 -89
- package/lib/screenplay/interactions/Hover.js.map +0 -1
- package/lib/screenplay/interactions/Navigate.d.ts +0 -141
- package/lib/screenplay/interactions/Navigate.js +0 -197
- package/lib/screenplay/interactions/Navigate.js.map +0 -1
- package/lib/screenplay/interactions/Press.d.ts +0 -84
- package/lib/screenplay/interactions/Press.js +0 -152
- package/lib/screenplay/interactions/Press.js.map +0 -1
- package/lib/screenplay/interactions/PressBuilder.d.ts +0 -26
- package/lib/screenplay/interactions/PressBuilder.js +0 -3
- package/lib/screenplay/interactions/PressBuilder.js.map +0 -1
- package/lib/screenplay/interactions/RightClick.d.ts +0 -89
- package/lib/screenplay/interactions/RightClick.js +0 -100
- package/lib/screenplay/interactions/RightClick.js.map +0 -1
- package/lib/screenplay/interactions/Scroll.d.ts +0 -75
- package/lib/screenplay/interactions/Scroll.js +0 -86
- package/lib/screenplay/interactions/Scroll.js.map +0 -1
- package/lib/screenplay/interactions/Wait.d.ts +0 -143
- package/lib/screenplay/interactions/Wait.js +0 -247
- package/lib/screenplay/interactions/Wait.js.map +0 -1
- package/lib/screenplay/interactions/WaitBuilder.d.ts +0 -32
- package/lib/screenplay/interactions/WaitBuilder.js +0 -3
- package/lib/screenplay/interactions/WaitBuilder.js.map +0 -1
- package/lib/screenplay/interactions/WebElementInteraction.d.ts +0 -37
- package/lib/screenplay/interactions/WebElementInteraction.js +0 -52
- package/lib/screenplay/interactions/WebElementInteraction.js.map +0 -1
- package/lib/screenplay/interactions/index.d.ts +0 -13
- package/lib/screenplay/interactions/index.js +0 -26
- package/lib/screenplay/interactions/index.js.map +0 -1
- package/lib/screenplay/questions/Attribute.d.ts +0 -82
- package/lib/screenplay/questions/Attribute.js +0 -102
- package/lib/screenplay/questions/Attribute.js.map +0 -1
- package/lib/screenplay/questions/CSSClasses.d.ts +0 -92
- package/lib/screenplay/questions/CSSClasses.js +0 -112
- package/lib/screenplay/questions/CSSClasses.js.map +0 -1
- package/lib/screenplay/questions/LastScriptExecution.d.ts +0 -14
- package/lib/screenplay/questions/LastScriptExecution.js +0 -22
- package/lib/screenplay/questions/LastScriptExecution.js.map +0 -1
- package/lib/screenplay/questions/NestedTargetBuilder.d.ts +0 -27
- package/lib/screenplay/questions/NestedTargetBuilder.js +0 -3
- package/lib/screenplay/questions/NestedTargetBuilder.js.map +0 -1
- package/lib/screenplay/questions/TargetBuilder.d.ts +0 -25
- package/lib/screenplay/questions/TargetBuilder.js +0 -3
- package/lib/screenplay/questions/TargetBuilder.js.map +0 -1
- package/lib/screenplay/questions/Text.d.ts +0 -95
- package/lib/screenplay/questions/Text.js +0 -130
- package/lib/screenplay/questions/Text.js.map +0 -1
- package/lib/screenplay/questions/Value.d.ts +0 -63
- package/lib/screenplay/questions/Value.js +0 -78
- package/lib/screenplay/questions/Value.js.map +0 -1
- package/lib/screenplay/questions/Website.d.ts +0 -21
- package/lib/screenplay/questions/Website.js +0 -31
- package/lib/screenplay/questions/Website.js.map +0 -1
- package/lib/screenplay/questions/index.d.ts +0 -10
- package/lib/screenplay/questions/index.js +0 -23
- package/lib/screenplay/questions/index.js.map +0 -1
- package/lib/screenplay/questions/lists.d.ts +0 -86
- package/lib/screenplay/questions/lists.js +0 -137
- package/lib/screenplay/questions/lists.js.map +0 -1
- package/lib/screenplay/questions/locators.d.ts +0 -196
- package/lib/screenplay/questions/locators.js +0 -219
- package/lib/screenplay/questions/locators.js.map +0 -1
- package/lib/screenplay/questions/targets.d.ts +0 -254
- package/lib/screenplay/questions/targets.js +0 -334
- package/lib/screenplay/questions/targets.js.map +0 -1
- package/lib/stage/crew/index.d.ts +0 -1
- package/lib/stage/crew/index.js +0 -14
- package/lib/stage/crew/index.js.map +0 -1
- package/lib/stage/crew/photographer/Photographer.d.ts +0 -83
- package/lib/stage/crew/photographer/Photographer.js +0 -102
- package/lib/stage/crew/photographer/Photographer.js.map +0 -1
- package/lib/stage/crew/photographer/index.d.ts +0 -2
- package/lib/stage/crew/photographer/index.js.map +0 -1
- package/lib/stage/crew/photographer/strategies/PhotoTakingStrategy.d.ts +0 -28
- package/lib/stage/crew/photographer/strategies/PhotoTakingStrategy.js +0 -65
- package/lib/stage/crew/photographer/strategies/PhotoTakingStrategy.js.map +0 -1
- package/lib/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.d.ts +0 -18
- package/lib/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.js +0 -30
- package/lib/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.js.map +0 -1
- package/lib/stage/crew/photographer/strategies/TakePhotosOfFailures.d.ts +0 -17
- package/lib/stage/crew/photographer/strategies/TakePhotosOfFailures.js +0 -28
- package/lib/stage/crew/photographer/strategies/TakePhotosOfFailures.js.map +0 -1
- package/lib/stage/crew/photographer/strategies/TakePhotosOfInteractions.d.ts +0 -19
- package/lib/stage/crew/photographer/strategies/TakePhotosOfInteractions.js +0 -28
- package/lib/stage/crew/photographer/strategies/TakePhotosOfInteractions.js.map +0 -1
- package/lib/stage/crew/photographer/strategies/index.d.ts +0 -4
- package/lib/stage/crew/photographer/strategies/index.js.map +0 -1
- package/lib/stage/index.d.ts +0 -1
- package/lib/stage/index.js +0 -14
- package/lib/stage/index.js.map +0 -1
- package/src/expectations/ElementExpectation.ts +0 -31
- package/src/expectations/index.ts +0 -6
- package/src/expectations/isActive.ts +0 -21
- package/src/expectations/isClickable.ts +0 -26
- package/src/expectations/isEnabled.ts +0 -19
- package/src/expectations/isPresent.ts +0 -20
- package/src/expectations/isSelected.ts +0 -19
- package/src/expectations/isVisible.ts +0 -19
- package/src/input/Key.ts +0 -83
- package/src/input/index.ts +0 -1
- package/src/screenplay/interactions/Clear.ts +0 -102
- package/src/screenplay/interactions/Click.ts +0 -85
- package/src/screenplay/interactions/DoubleClick.ts +0 -102
- package/src/screenplay/interactions/Enter.ts +0 -93
- package/src/screenplay/interactions/EnterBuilder.ts +0 -27
- package/src/screenplay/interactions/ExecuteScript.ts +0 -344
- package/src/screenplay/interactions/Hover.ts +0 -90
- package/src/screenplay/interactions/Navigate.ts +0 -208
- package/src/screenplay/interactions/Press.ts +0 -172
- package/src/screenplay/interactions/PressBuilder.ts +0 -28
- package/src/screenplay/interactions/RightClick.ts +0 -100
- package/src/screenplay/interactions/Scroll.ts +0 -87
- package/src/screenplay/interactions/Wait.ts +0 -267
- package/src/screenplay/interactions/WaitBuilder.ts +0 -34
- package/src/screenplay/interactions/WebElementInteraction.ts +0 -56
- package/src/screenplay/interactions/index.ts +0 -13
- package/src/screenplay/questions/Attribute.ts +0 -112
- package/src/screenplay/questions/CSSClasses.ts +0 -116
- package/src/screenplay/questions/LastScriptExecution.ts +0 -21
- package/src/screenplay/questions/NestedTargetBuilder.ts +0 -30
- package/src/screenplay/questions/TargetBuilder.ts +0 -27
- package/src/screenplay/questions/Text.ts +0 -140
- package/src/screenplay/questions/Value.ts +0 -82
- package/src/screenplay/questions/Website.ts +0 -34
- package/src/screenplay/questions/index.ts +0 -10
- package/src/screenplay/questions/lists.ts +0 -161
- package/src/screenplay/questions/locators.ts +0 -254
- package/src/screenplay/questions/targets.ts +0 -401
- package/src/stage/crew/index.ts +0 -1
- package/src/stage/crew/photographer/Photographer.ts +0 -108
- package/src/stage/crew/photographer/index.ts +0 -2
- package/src/stage/crew/photographer/strategies/PhotoTakingStrategy.ts +0 -103
- package/src/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.ts +0 -28
- package/src/stage/crew/photographer/strategies/TakePhotosOfFailures.ts +0 -26
- package/src/stage/crew/photographer/strategies/TakePhotosOfInteractions.ts +0 -26
- package/src/stage/crew/photographer/strategies/index.ts +0 -4
- package/src/stage/index.ts +0 -1
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebdriverIOPageElement = void 0;
|
|
4
|
+
const web_1 = require("@serenity-js/web");
|
|
5
|
+
class WebdriverIOPageElement extends web_1.PageElement {
|
|
6
|
+
of(parent) {
|
|
7
|
+
return new WebdriverIOPageElement(this.locator.of(parent.locator));
|
|
8
|
+
}
|
|
9
|
+
async clearValue() {
|
|
10
|
+
const element = await this.nativeElement();
|
|
11
|
+
return element.clearValue();
|
|
12
|
+
}
|
|
13
|
+
async click() {
|
|
14
|
+
const element = await this.nativeElement();
|
|
15
|
+
return element.click();
|
|
16
|
+
}
|
|
17
|
+
async doubleClick() {
|
|
18
|
+
const element = await this.nativeElement();
|
|
19
|
+
return element.doubleClick();
|
|
20
|
+
}
|
|
21
|
+
async enterValue(value) {
|
|
22
|
+
const element = await this.nativeElement();
|
|
23
|
+
return element.addValue(value);
|
|
24
|
+
}
|
|
25
|
+
async scrollIntoView() {
|
|
26
|
+
const element = await this.nativeElement();
|
|
27
|
+
return element.scrollIntoView();
|
|
28
|
+
}
|
|
29
|
+
async hoverOver() {
|
|
30
|
+
const element = await this.nativeElement();
|
|
31
|
+
return element.moveTo();
|
|
32
|
+
}
|
|
33
|
+
async rightClick() {
|
|
34
|
+
const element = await this.nativeElement();
|
|
35
|
+
return element.click({ button: 'right' });
|
|
36
|
+
}
|
|
37
|
+
async attribute(name) {
|
|
38
|
+
const element = await this.nativeElement();
|
|
39
|
+
return element.getAttribute(name);
|
|
40
|
+
}
|
|
41
|
+
async text() {
|
|
42
|
+
const element = await this.nativeElement();
|
|
43
|
+
return element.getText();
|
|
44
|
+
}
|
|
45
|
+
async value() {
|
|
46
|
+
const element = await this.nativeElement();
|
|
47
|
+
return element.getValue();
|
|
48
|
+
}
|
|
49
|
+
async isActive() {
|
|
50
|
+
const element = await this.nativeElement();
|
|
51
|
+
return element.isFocused();
|
|
52
|
+
}
|
|
53
|
+
async isClickable() {
|
|
54
|
+
const element = await this.nativeElement();
|
|
55
|
+
return element.isClickable();
|
|
56
|
+
}
|
|
57
|
+
async isEnabled() {
|
|
58
|
+
const element = await this.nativeElement();
|
|
59
|
+
return element.isEnabled();
|
|
60
|
+
}
|
|
61
|
+
async isPresent() {
|
|
62
|
+
const element = await this.nativeElement();
|
|
63
|
+
return element.isExisting();
|
|
64
|
+
}
|
|
65
|
+
async isSelected() {
|
|
66
|
+
const element = await this.nativeElement();
|
|
67
|
+
return element.isSelected();
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @desc
|
|
71
|
+
* Checks if the PageElement:
|
|
72
|
+
* - is displayed,
|
|
73
|
+
* - is visible within the browser viewport,
|
|
74
|
+
* - has not its center covered by other elements
|
|
75
|
+
*
|
|
76
|
+
* @see https://webdriver.io/docs/api/element/isDisplayedInViewport/
|
|
77
|
+
*/
|
|
78
|
+
async isVisible() {
|
|
79
|
+
const element = await this.nativeElement();
|
|
80
|
+
if (!await element.isDisplayed()) {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
if (!await element.isDisplayedInViewport()) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
const browser = await this.browserFor(element);
|
|
87
|
+
/* eslint-disable no-var,unicorn/consistent-function-scoping,unicorn/prevent-abbreviations,@typescript-eslint/ban-ts-comment,unicorn/no-for-loop,prefer-const */
|
|
88
|
+
// get element at cx/cy and see if the element we found is our element, and therefore it's visible.
|
|
89
|
+
return browser.execute(
|
|
90
|
+
/* istanbul ignore next */
|
|
91
|
+
function isVisible(element) {
|
|
92
|
+
if (!element.getBoundingClientRect || !element.scrollIntoView || !element.contains || !element.getClientRects || !document.elementFromPoint) {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
// Edge before switching to Chromium
|
|
96
|
+
const isOldEdge = !!window['StyleMedia'];
|
|
97
|
+
// get overlapping element
|
|
98
|
+
function getOverlappingElement(elem, context) {
|
|
99
|
+
context = context || document;
|
|
100
|
+
const elemDimension = elem.getBoundingClientRect();
|
|
101
|
+
const x = elemDimension.left + (elem.clientWidth / 2);
|
|
102
|
+
const y = elemDimension.top + (elem.clientHeight / 2);
|
|
103
|
+
return context.elementFromPoint(x, y);
|
|
104
|
+
}
|
|
105
|
+
// get overlapping element rects (currently only the first)
|
|
106
|
+
// applicable if element's text is multiline.
|
|
107
|
+
function getOverlappingRects(elem, context) {
|
|
108
|
+
context = context || document;
|
|
109
|
+
const elems = [];
|
|
110
|
+
const rects = elem.getClientRects();
|
|
111
|
+
// webdriver clicks on center of the first element's rect (line of text), it might change in future
|
|
112
|
+
const rect = rects[0];
|
|
113
|
+
const x = rect.left + (rect.width / 2);
|
|
114
|
+
const y = rect.top + (rect.height / 2);
|
|
115
|
+
elems.push(context.elementFromPoint(x, y));
|
|
116
|
+
return elems;
|
|
117
|
+
}
|
|
118
|
+
// get overlapping elements
|
|
119
|
+
function getOverlappingElements(elem, context) {
|
|
120
|
+
return [getOverlappingElement(elem, context)].concat(getOverlappingRects(elem, context));
|
|
121
|
+
}
|
|
122
|
+
// is a node a descendant of a given node
|
|
123
|
+
function nodeContains(elem, otherNode) {
|
|
124
|
+
// Edge doesn't support neither Shadow Dom nor contains if ShadowRoot polyfill is used
|
|
125
|
+
if (isOldEdge) {
|
|
126
|
+
let tmpElement = otherNode;
|
|
127
|
+
while (tmpElement) {
|
|
128
|
+
if (tmpElement === elem) {
|
|
129
|
+
return true;
|
|
130
|
+
}
|
|
131
|
+
tmpElement = tmpElement.parentNode;
|
|
132
|
+
// DocumentFragment / ShadowRoot polyfill like ShadyRoot
|
|
133
|
+
if (tmpElement && tmpElement.nodeType === 11 && tmpElement.host) {
|
|
134
|
+
tmpElement = tmpElement.host;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return false;
|
|
138
|
+
}
|
|
139
|
+
return elem.contains(otherNode);
|
|
140
|
+
}
|
|
141
|
+
// is one of overlapping elements the `elem` or one of its child
|
|
142
|
+
function isOverlappingElementMatch(elementsFromPoint, elem) {
|
|
143
|
+
if (elementsFromPoint.some(function (elementFromPoint) {
|
|
144
|
+
return elementFromPoint === elem || nodeContains(elem, elementFromPoint);
|
|
145
|
+
})) {
|
|
146
|
+
return true;
|
|
147
|
+
}
|
|
148
|
+
// shadow root
|
|
149
|
+
// filter unique elements with shadowRoot
|
|
150
|
+
// @ts-ignore
|
|
151
|
+
let elemsWithShadowRoot = [].concat(elementsFromPoint);
|
|
152
|
+
elemsWithShadowRoot = elemsWithShadowRoot.filter(function (x) {
|
|
153
|
+
return x && x.shadowRoot && x.shadowRoot.elementFromPoint;
|
|
154
|
+
});
|
|
155
|
+
// getOverlappingElements of every element with shadowRoot
|
|
156
|
+
let shadowElementsFromPoint = [];
|
|
157
|
+
for (let i = 0; i < elemsWithShadowRoot.length; ++i) {
|
|
158
|
+
let shadowElement = elemsWithShadowRoot[i];
|
|
159
|
+
shadowElementsFromPoint = shadowElementsFromPoint.concat(getOverlappingElements(elem, shadowElement.shadowRoot));
|
|
160
|
+
}
|
|
161
|
+
// remove duplicates and parents
|
|
162
|
+
// @ts-ignore
|
|
163
|
+
shadowElementsFromPoint = [].concat(shadowElementsFromPoint);
|
|
164
|
+
shadowElementsFromPoint = shadowElementsFromPoint.filter(function (x) {
|
|
165
|
+
return !elementsFromPoint.includes(x);
|
|
166
|
+
});
|
|
167
|
+
if (shadowElementsFromPoint.length === 0) {
|
|
168
|
+
return false;
|
|
169
|
+
}
|
|
170
|
+
return isOverlappingElementMatch(shadowElementsFromPoint, elem);
|
|
171
|
+
}
|
|
172
|
+
return isOverlappingElementMatch(getOverlappingElements(element), element);
|
|
173
|
+
}, element);
|
|
174
|
+
/* eslint-enable no-var,unicorn/consistent-function-scoping,unicorn/prevent-abbreviations,@typescript-eslint/ban-ts-comment,unicorn/no-for-loop,prefer-const */
|
|
175
|
+
}
|
|
176
|
+
// based on https://github.com/webdriverio/webdriverio/blob/dec6da76b0e218af935dbf39735ae3491d5edd8c/packages/webdriverio/src/utils/index.ts#L98
|
|
177
|
+
async browserFor(nativeElement) {
|
|
178
|
+
const element = nativeElement;
|
|
179
|
+
return element.parent
|
|
180
|
+
? this.browserFor(element.parent)
|
|
181
|
+
: nativeElement;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
exports.WebdriverIOPageElement = WebdriverIOPageElement;
|
|
185
|
+
//# sourceMappingURL=WebdriverIOPageElement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebdriverIOPageElement.js","sourceRoot":"","sources":["../../../src/screenplay/models/WebdriverIOPageElement.ts"],"names":[],"mappings":";;;AAAA,0CAA+C;AAG/C,MAAa,sBACT,SAAQ,iBAAkC;IAE1C,EAAE,CAAC,MAA8B;QAC7B,OAAO,IAAI,sBAAsB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAA;IACtE,CAAC;IAED,KAAK,CAAC,UAAU;QACZ,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;QAC3C,OAAO,OAAO,CAAC,UAAU,EAAE,CAAC;IAChC,CAAC;IAED,KAAK,CAAC,KAAK;QACP,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;QAC3C,OAAO,OAAO,CAAC,KAAK,EAAE,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,WAAW;QACb,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;QAC3C,OAAO,OAAO,CAAC,WAAW,EAAE,CAAC;IACjC,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,KAA+C;QAC5D,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;QAC3C,OAAO,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,cAAc;QAChB,MA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,UAAiB,CAAQ,CACxF,CAAA;iBACJ;gBACD,gCAAgC;gBAChC,aAAa;gBACb,uBAAuB,GAAG,EAAE,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAA;gBAC5D,uBAAuB,GAAG,uBAAuB,CAAC,MAAM,CAAC,UAAU,CAAC;oBAChE,OAAO,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;gBACzC,CAAC,CAAC,CAAA;gBAEF,IAAI,uBAAuB,CAAC,MAAM,KAAK,CAAC,EAAE;oBACtC,OAAO,KAAK,CAAA;iBACf;gBAED,OAAO,yBAAyB,CAAC,uBAAuB,EAAE,IAAI,CAAC,CAAA;YACnE,CAAC;YAED,OAAO,yBAAyB,CAAC,sBAAsB,CAAC,OAAO,CAAyB,EAAE,OAAO,CAAC,CAAA;QACtG,CAAC,EACD,OAAO,CACV,CAAC;QAEF,+JAA+J;IACnK,CAAC;IAED,gJAAgJ;IACxI,KAAK,CAAC,UAAU,CAAC,aAA4D;QACjF,MAAM,OAAO,GAAG,aAAsC,CAAC;QACvD,OAAO,OAAO,CAAC,MAAM;YACjB,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC;YACjC,CAAC,CAAC,aAAa,CAAA;IACvB,CAAC;CACJ;AA/ND,wDA+NC"}
|
|
@@ -10,8 +10,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./
|
|
14
|
-
__exportStar(require("./
|
|
15
|
-
__exportStar(require("./
|
|
16
|
-
__exportStar(require("./
|
|
13
|
+
__exportStar(require("./WebdriverIOCookie"), exports);
|
|
14
|
+
__exportStar(require("./WebdriverIOFrame"), exports);
|
|
15
|
+
__exportStar(require("./WebdriverIOModalDialog"), exports);
|
|
16
|
+
__exportStar(require("./WebdriverIOPage"), exports);
|
|
17
|
+
__exportStar(require("./WebdriverIOPageElement"), exports);
|
|
17
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/screenplay/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sDAAoC;AACpC,qDAAmC;AACnC,2DAAyC;AACzC,oDAAkC;AAClC,2DAAyC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Locator, PageElement, Selector } from '@serenity-js/web';
|
|
2
|
+
import * as wdio from 'webdriverio';
|
|
3
|
+
import { WebdriverIONativeElementRoot } from './WebdriverIONativeElementRoot';
|
|
4
|
+
export declare class WebdriverIOLocator<Selector_Type extends Selector> extends Locator<wdio.Element<'async'>, WebdriverIONativeElementRoot, Selector_Type> {
|
|
5
|
+
static createRootLocator<ST extends Selector>(browser: WebdriverIONativeElementRoot, selector: ST, webdriverioSelector: string): WebdriverIOLocator<ST>;
|
|
6
|
+
of(parent: WebdriverIOLocator<unknown>): Locator<wdio.Element<'async'>, WebdriverIONativeElementRoot, Selector_Type>;
|
|
7
|
+
element(): PageElement<wdio.Element<'async'>>;
|
|
8
|
+
allElements(): Promise<Array<PageElement<wdio.Element<'async'>>>>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebdriverIOLocator = void 0;
|
|
4
|
+
const web_1 = require("@serenity-js/web");
|
|
5
|
+
const WebdriverIOPageElement_1 = require("../WebdriverIOPageElement");
|
|
6
|
+
class WebdriverIOLocator extends web_1.Locator {
|
|
7
|
+
static createRootLocator(browser, selector, webdriverioSelector) {
|
|
8
|
+
return new WebdriverIOLocator(() => browser, selector, (root) => root.$(webdriverioSelector), (root) => root.$$(webdriverioSelector));
|
|
9
|
+
}
|
|
10
|
+
of(parent) {
|
|
11
|
+
return new WebdriverIOLocator(() => parent.nativeElement(), this.selector, (parentRoot) => this.locateElement(parentRoot), (parentRoot) => this.locateAllElements(parentRoot));
|
|
12
|
+
}
|
|
13
|
+
element() {
|
|
14
|
+
return new WebdriverIOPageElement_1.WebdriverIOPageElement(this);
|
|
15
|
+
}
|
|
16
|
+
async allElements() {
|
|
17
|
+
const elements = await this.locateAllElements(await this.parentRoot());
|
|
18
|
+
return elements.map(childElement => new WebdriverIOPageElement_1.WebdriverIOPageElement(new WebdriverIOLocator(() => this.parentRoot(), this.selector, () => childElement, () => [childElement])));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.WebdriverIOLocator = WebdriverIOLocator;
|
|
22
|
+
//# sourceMappingURL=WebdriverIOLocator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebdriverIOLocator.js","sourceRoot":"","sources":["../../../../src/screenplay/models/locators/WebdriverIOLocator.ts"],"names":[],"mappings":";;;AAAA,0CAAkE;AAGlE,sEAAmE;AAGnE,MAAa,kBAAmD,SAAQ,aAA2E;IAE/I,MAAM,CAAC,iBAAiB,CAAsB,OAAqC,EAAE,QAAY,EAAE,mBAA2B;QAC1H,OAAO,IAAI,kBAAkB,CACzB,GAAG,EAAE,CAAC,OAAO,EACb,QAAQ,EACR,CAAC,IAAkC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,mBAAmB,CAAqC,EACvG,CAAC,IAAkC,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,mBAAmB,CAAC,CACvE,CAAC;IACN,CAAC;IAED,EAAE,CAAC,MAAmC;QAClC,OAAO,IAAI,kBAAkB,CACzB,GAAG,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,EAC5B,IAAI,CAAC,QAAQ,EACb,CAAC,UAAwC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,EAC5E,CAAC,UAAwC,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CACnF,CAAC;IACN,CAAC;IAED,OAAO;QACH,OAAO,IAAI,+CAAsB,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,WAAW;QACb,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;QAEvE,OAAO,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAC/B,IAAI,+CAAsB,CAAC,IAAI,kBAAkB,CAC7C,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,EACvB,IAAI,CAAC,QAAQ,EACb,GAAG,EAAE,CAAC,YAAY,EAClB,GAAG,EAAE,CAAC,CAAE,YAAY,CAAE,CACzB,CAAC,CACL,CAAC;IACN,CAAC;CACJ;AApCD,gDAoCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebdriverIONativeElementRoot.js","sourceRoot":"","sources":["../../../../src/screenplay/models/locators/WebdriverIONativeElementRoot.ts"],"names":[],"mappings":""}
|
|
@@ -10,6 +10,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./
|
|
14
|
-
__exportStar(require("./
|
|
13
|
+
__exportStar(require("./WebdriverIOLocator"), exports);
|
|
14
|
+
__exportStar(require("./WebdriverIONativeElementRoot"), exports);
|
|
15
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/screenplay/models/locators/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAqC;AACrC,iEAA+C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serenity-js/webdriverio",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-rc.11",
|
|
4
4
|
"description": "Serenity/JS reporter and Screenplay Pattern library for WebdriverIO",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jan Molak",
|
|
@@ -31,14 +31,9 @@
|
|
|
31
31
|
],
|
|
32
32
|
"scripts": {
|
|
33
33
|
"clean": "rimraf .nyc_output lib target",
|
|
34
|
-
"lint": "eslint --ext ts --config ../../.eslintrc.
|
|
34
|
+
"lint": "eslint --ext ts --config ../../.eslintrc.yml .",
|
|
35
35
|
"lint:fix": "npm run lint -- --fix",
|
|
36
|
-
"test": "
|
|
37
|
-
"test:mocha": "nyc --report-dir ../../target/coverage/webdriverio/mocha mocha --config ../../.mocharc.yml 'spec/adapter/**/*.spec.*'",
|
|
38
|
-
"test:wdio": "cross-env PORT=8080 start-server-and-test test:wdio:start-server http://localhost:8080 test:wdio:run",
|
|
39
|
-
"test:wdio:start-server": "static-content-server",
|
|
40
|
-
"test:wdio:run": "nyc --report-dir ../../target/coverage/webdriverio/wdio wdio ./spec/wdio.conf.ts",
|
|
41
|
-
"wdio": "wdio ./spec/wdio.conf.ts",
|
|
36
|
+
"test": "nyc --report-dir ../../target/coverage/webdriverio/mocha mocha --config ../../.mocharc.yml 'spec/adapter/**/*.spec.*'",
|
|
42
37
|
"compile": "tsc --project tsconfig.json",
|
|
43
38
|
"site": "esdoc -c .esdoc.js"
|
|
44
39
|
},
|
|
@@ -50,11 +45,12 @@
|
|
|
50
45
|
"url": "https://github.com/serenity-js/serenity-js/issues"
|
|
51
46
|
},
|
|
52
47
|
"engines": {
|
|
53
|
-
"node": "^
|
|
48
|
+
"node": "^14 || ^16",
|
|
54
49
|
"npm": "^6 || ^7 || ^8"
|
|
55
50
|
},
|
|
56
51
|
"dependencies": {
|
|
57
|
-
"@serenity-js/core": "
|
|
52
|
+
"@serenity-js/core": "3.0.0-rc.11",
|
|
53
|
+
"@serenity-js/web": "3.0.0-rc.11",
|
|
58
54
|
"@wdio/reporter": "^7.16.14",
|
|
59
55
|
"@wdio/types": "^7.16.14",
|
|
60
56
|
"deepmerge": "^4.2.2",
|
|
@@ -62,10 +58,11 @@
|
|
|
62
58
|
"tiny-types": "^1.17.0"
|
|
63
59
|
},
|
|
64
60
|
"peerDependencies": {
|
|
65
|
-
"@serenity-js/cucumber": "^
|
|
66
|
-
"@serenity-js/jasmine": "^
|
|
67
|
-
"@serenity-js/mocha": "^
|
|
68
|
-
"@wdio/cli": "^7.16.14"
|
|
61
|
+
"@serenity-js/cucumber": "^3.0.0-rc",
|
|
62
|
+
"@serenity-js/jasmine": "^3.0.0-rc",
|
|
63
|
+
"@serenity-js/mocha": "^3.0.0-rc",
|
|
64
|
+
"@wdio/cli": "^7.16.14",
|
|
65
|
+
"webdriverio": "^7.16.14"
|
|
69
66
|
},
|
|
70
67
|
"peerDependenciesMeta": {
|
|
71
68
|
"@serenity-js/cucumber": {
|
|
@@ -79,15 +76,8 @@
|
|
|
79
76
|
}
|
|
80
77
|
},
|
|
81
78
|
"devDependencies": {
|
|
82
|
-
"@documentation/esdoc-template": "
|
|
83
|
-
"@integration/testing-tools": "
|
|
84
|
-
"@integration/web-testing-tools": "2.0.0",
|
|
85
|
-
"@serenity-js/assertions": "2.33.1",
|
|
86
|
-
"@serenity-js/console-reporter": "2.33.1",
|
|
87
|
-
"@serenity-js/cucumber": "2.33.1",
|
|
88
|
-
"@serenity-js/jasmine": "2.33.1",
|
|
89
|
-
"@serenity-js/mocha": "2.33.1",
|
|
90
|
-
"@serenity-js/rest": "2.33.1",
|
|
79
|
+
"@documentation/esdoc-template": "3.0.0",
|
|
80
|
+
"@integration/testing-tools": "3.0.0",
|
|
91
81
|
"@types/mocha": "^9.0.0",
|
|
92
82
|
"@wdio/cli": "^7.16.14",
|
|
93
83
|
"@wdio/devtools-service": "^7.16.14",
|
|
@@ -122,5 +112,5 @@
|
|
|
122
112
|
"cache": true,
|
|
123
113
|
"all": false
|
|
124
114
|
},
|
|
125
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "0a232ce7ff21df56a9cc9e64859af5b0bce33b32"
|
|
126
116
|
}
|