@applitools/driver 1.11.5 → 1.11.7
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/dist/element.js +18 -14
- package/package.json +4 -4
package/dist/element.js
CHANGED
|
@@ -53,6 +53,9 @@ class Element {
|
|
|
53
53
|
if (specUtils.isSimpleCommonSelector(this._selector)) {
|
|
54
54
|
this._commonSelector = this._selector;
|
|
55
55
|
}
|
|
56
|
+
else if (utils.types.isString(this._selector)) {
|
|
57
|
+
this._commonSelector = { selector: this._selector };
|
|
58
|
+
}
|
|
56
59
|
else if (this._selector && this._spec.untransformSelector) {
|
|
57
60
|
this._commonSelector = this._spec.untransformSelector(this._spec.transformSelector(this._selector));
|
|
58
61
|
}
|
|
@@ -191,21 +194,22 @@ class Element {
|
|
|
191
194
|
catch (err) {
|
|
192
195
|
this._logger.warn(`Unable to get the attribute 'contentSize' due to the following error: '${err.message}'`);
|
|
193
196
|
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
197
|
+
if (this.driver.isIOS) {
|
|
198
|
+
const type = await this.getAttribute('type');
|
|
199
|
+
if (type === 'XCUIElementTypeScrollView') {
|
|
200
|
+
const elementRegion = await this._spec.getElementRegion(this.driver.target, this.target);
|
|
201
|
+
const [childElement] = await this.driver.elements({
|
|
202
|
+
type: 'xpath',
|
|
203
|
+
selector: '//XCUIElementTypeScrollView[1]/*', // We cannot be sure that our element is the first one
|
|
204
|
+
});
|
|
205
|
+
const childElementRegion = await this._spec.getElementRegion(this.driver.target, childElement.target);
|
|
206
|
+
return {
|
|
207
|
+
...elementRegion,
|
|
208
|
+
height: childElementRegion.y + childElementRegion.height - elementRegion.y,
|
|
209
|
+
};
|
|
210
|
+
}
|
|
206
211
|
}
|
|
207
|
-
|
|
208
|
-
return this._spec.getElementRegion(this.driver.target, this.target);
|
|
212
|
+
return this._spec.getElementRegion(this.driver.target, this.target);
|
|
209
213
|
}
|
|
210
214
|
async getContentSize(options = {}) {
|
|
211
215
|
if (this._state.contentSize)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/driver",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.7",
|
|
4
4
|
"description": "Applitools universal framework wrapper",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"applitools",
|
|
@@ -87,9 +87,9 @@
|
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@applitools/logger": "1.1.
|
|
91
|
-
"@applitools/snippets": "2.4.
|
|
92
|
-
"@applitools/utils": "1.3.
|
|
90
|
+
"@applitools/logger": "1.1.30",
|
|
91
|
+
"@applitools/snippets": "2.4.8",
|
|
92
|
+
"@applitools/utils": "1.3.16",
|
|
93
93
|
"semver": "7.3.7"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|