@applitools/driver 1.9.15 → 1.9.16
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/driver.js +35 -30
- package/dist/element.js +17 -26
- package/dist/fake/spec-driver.js +1 -2
- package/dist/helper-android.js +4 -28
- package/dist/helper-ios.js +11 -10
- package/package.json +2 -1
- package/types/helper-android.d.ts +1 -1
- package/types/helper-ios.d.ts +1 -1
package/dist/driver.js
CHANGED
|
@@ -144,8 +144,8 @@ class Driver {
|
|
|
144
144
|
this._currentContext = context;
|
|
145
145
|
}
|
|
146
146
|
async init() {
|
|
147
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
|
148
|
-
var
|
|
147
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
|
|
148
|
+
var _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14;
|
|
149
149
|
const capabilities = await ((_b = (_a = this._spec).getCapabilities) === null || _b === void 0 ? void 0 : _b.call(_a, this.target));
|
|
150
150
|
this._logger.log('Driver capabilities', capabilities);
|
|
151
151
|
const capabilitiesInfo = capabilities ? (0, capabilities_1.parseCapabilities)(capabilities, this._customConfig) : undefined;
|
|
@@ -156,39 +156,46 @@ class Driver {
|
|
|
156
156
|
(_e = (await this.getOrientation().catch(() => undefined))) !== null && _e !== void 0 ? _e : this._driverInfo.orientation;
|
|
157
157
|
}
|
|
158
158
|
if (this.isWeb) {
|
|
159
|
-
(_f = (
|
|
160
|
-
(_g = (
|
|
161
|
-
(_h = (
|
|
159
|
+
(_f = (_3 = this._driverInfo).pixelRatio) !== null && _f !== void 0 ? _f : (_3.pixelRatio = await this.execute(snippets.getPixelRatio));
|
|
160
|
+
(_g = (_4 = this._driverInfo).viewportScale) !== null && _g !== void 0 ? _g : (_4.viewportScale = await this.execute(snippets.getViewportScale));
|
|
161
|
+
(_h = (_5 = this._driverInfo).userAgent) !== null && _h !== void 0 ? _h : (_5.userAgent = await this.execute(snippets.getUserAgent));
|
|
162
162
|
if (this._driverInfo.userAgent) {
|
|
163
163
|
const userAgentInfo = (0, user_agent_1.parseUserAgent)(this._driverInfo.userAgent);
|
|
164
164
|
this._driverInfo.browserName = (_j = userAgentInfo.browserName) !== null && _j !== void 0 ? _j : this._driverInfo.browserName;
|
|
165
165
|
this._driverInfo.browserVersion = (_k = userAgentInfo.browserVersion) !== null && _k !== void 0 ? _k : this._driverInfo.browserVersion;
|
|
166
166
|
if (this._driverInfo.isMobile) {
|
|
167
|
-
(_l = (
|
|
168
|
-
(_m = (
|
|
167
|
+
(_l = (_6 = this._driverInfo).platformName) !== null && _l !== void 0 ? _l : (_6.platformName = userAgentInfo.platformName);
|
|
168
|
+
(_m = (_7 = this._driverInfo).platformVersion) !== null && _m !== void 0 ? _m : (_7.platformVersion = userAgentInfo.platformVersion);
|
|
169
169
|
}
|
|
170
170
|
else {
|
|
171
171
|
this._driverInfo.platformName = (_o = userAgentInfo.platformName) !== null && _o !== void 0 ? _o : this._driverInfo.platformName;
|
|
172
172
|
this._driverInfo.platformVersion = (_p = userAgentInfo.platformVersion) !== null && _p !== void 0 ? _p : this._driverInfo.platformVersion;
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
|
-
(_q = (
|
|
176
|
-
(_r = (
|
|
175
|
+
(_q = (_8 = this._driverInfo).features) !== null && _q !== void 0 ? _q : (_8.features = {});
|
|
176
|
+
(_r = (_9 = this._driverInfo.features).allCookies) !== null && _r !== void 0 ? _r : (_9.allCookies = /chrome/i.test(this._driverInfo.browserName) && !this._driverInfo.isMobile);
|
|
177
177
|
}
|
|
178
178
|
else {
|
|
179
179
|
// this value always excludes the height of the navigation bar, and sometimes it also excludes the height of the status bar
|
|
180
180
|
let windowSize = await this._spec.getWindowSize(this.target);
|
|
181
|
-
(_s = (
|
|
181
|
+
(_s = (_10 = this._driverInfo).displaySize) !== null && _s !== void 0 ? _s : (_10.displaySize = windowSize);
|
|
182
|
+
if (((_t = this.orientation) === null || _t === void 0 ? void 0 : _t.startsWith('landscape')) &&
|
|
183
|
+
this._driverInfo.displaySize.height > this._driverInfo.displaySize.width) {
|
|
184
|
+
this._driverInfo.displaySize = {
|
|
185
|
+
width: this._driverInfo.displaySize.height,
|
|
186
|
+
height: this._driverInfo.displaySize.width,
|
|
187
|
+
};
|
|
188
|
+
}
|
|
182
189
|
if (this.isAndroid) {
|
|
183
190
|
// bar sizes could be extracted only on android
|
|
184
|
-
const systemBars = await ((
|
|
191
|
+
const systemBars = await ((_v = (_u = this._spec).getSystemBars) === null || _v === void 0 ? void 0 : _v.call(_u, this.target).catch(() => null));
|
|
185
192
|
const { statusBar, navigationBar } = systemBars !== null && systemBars !== void 0 ? systemBars : {};
|
|
186
193
|
if (statusBar === null || statusBar === void 0 ? void 0 : statusBar.visible) {
|
|
187
194
|
this._logger.log('Driver status bar', statusBar);
|
|
188
195
|
const statusBarSize = statusBar.height;
|
|
189
196
|
// when status bar is overlapping content on android it returns status bar height equal to display height
|
|
190
197
|
if (statusBarSize < this._driverInfo.displaySize.height) {
|
|
191
|
-
this._driverInfo.statusBarSize = Math.max((
|
|
198
|
+
this._driverInfo.statusBarSize = Math.max((_w = this._driverInfo.statusBarSize) !== null && _w !== void 0 ? _w : 0, statusBarSize);
|
|
192
199
|
}
|
|
193
200
|
}
|
|
194
201
|
if (navigationBar === null || navigationBar === void 0 ? void 0 : navigationBar.visible) {
|
|
@@ -197,40 +204,38 @@ class Driver {
|
|
|
197
204
|
if (navigationBar.x > 0)
|
|
198
205
|
this._driverInfo.orientation = 'landscape-secondary';
|
|
199
206
|
// navigation bar size could be its height or width depending on screen orientation
|
|
200
|
-
const navigationBarSize = navigationBar[((
|
|
207
|
+
const navigationBarSize = navigationBar[((_x = this.orientation) === null || _x === void 0 ? void 0 : _x.startsWith('landscape')) ? 'width' : 'height'];
|
|
201
208
|
// when navigation bar is invisible on android it returns navigation bar size equal to display size
|
|
202
209
|
if (navigationBarSize <
|
|
203
|
-
this._driverInfo.displaySize[((
|
|
204
|
-
this._driverInfo.navigationBarSize = Math.max((
|
|
210
|
+
this._driverInfo.displaySize[((_y = this.orientation) === null || _y === void 0 ? void 0 : _y.startsWith('landscape')) ? 'width' : 'height']) {
|
|
211
|
+
this._driverInfo.navigationBarSize = Math.max((_z = this._driverInfo.navigationBarSize) !== null && _z !== void 0 ? _z : 0, navigationBarSize);
|
|
205
212
|
}
|
|
206
213
|
else {
|
|
207
214
|
this._driverInfo.navigationBarSize = 0;
|
|
208
215
|
}
|
|
209
216
|
}
|
|
210
217
|
// bar sizes have to be scaled on android
|
|
211
|
-
(
|
|
212
|
-
(
|
|
218
|
+
(_11 = this._driverInfo).statusBarSize && (_11.statusBarSize = this._driverInfo.statusBarSize / this.pixelRatio);
|
|
219
|
+
(_12 = this._driverInfo).navigationBarSize && (_12.navigationBarSize = this._driverInfo.navigationBarSize / this.pixelRatio);
|
|
213
220
|
windowSize = utils.geometry.scale(windowSize, 1 / this.pixelRatio);
|
|
214
|
-
(
|
|
221
|
+
(_13 = this._driverInfo).displaySize && (_13.displaySize = utils.geometry.scale(this._driverInfo.displaySize, 1 / this.pixelRatio));
|
|
222
|
+
}
|
|
223
|
+
if (this.isIOS) {
|
|
224
|
+
if ((_0 = this.orientation) === null || _0 === void 0 ? void 0 : _0.startsWith('landscape'))
|
|
225
|
+
this._driverInfo.statusBarSize = 0;
|
|
215
226
|
}
|
|
216
227
|
// calculate viewport location
|
|
217
|
-
(
|
|
228
|
+
(_1 = (_14 = this._driverInfo).viewportLocation) !== null && _1 !== void 0 ? _1 : (_14.viewportLocation = {
|
|
218
229
|
x: this.orientation === 'landscape' ? this.navigationBarSize : 0,
|
|
219
230
|
y: this.statusBarSize,
|
|
220
231
|
});
|
|
221
232
|
// calculate viewport size
|
|
222
233
|
if (!this._driverInfo.viewportSize) {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
}
|
|
229
|
-
else {
|
|
230
|
-
this._driverInfo.viewportSize = {
|
|
231
|
-
width: this._driverInfo.displaySize.width,
|
|
232
|
-
height: this._driverInfo.displaySize.height - this.statusBarSize - this.navigationBarSize,
|
|
233
|
-
};
|
|
234
|
+
this._driverInfo.viewportSize = { ...this._driverInfo.displaySize };
|
|
235
|
+
this._driverInfo.viewportSize.height -= this.statusBarSize;
|
|
236
|
+
if (this.isAndroid) {
|
|
237
|
+
this._driverInfo.viewportSize[((_2 = this.orientation) === null || _2 === void 0 ? void 0 : _2.startsWith('landscape')) ? 'width' : 'height'] -=
|
|
238
|
+
this.navigationBarSize;
|
|
234
239
|
}
|
|
235
240
|
}
|
|
236
241
|
// calculate safe area
|
package/dist/element.js
CHANGED
|
@@ -90,8 +90,8 @@ class Element {
|
|
|
90
90
|
}
|
|
91
91
|
async contains(innerElement) {
|
|
92
92
|
const contains = await this.withRefresh(async () => {
|
|
93
|
-
var _a, _b, _c, _d
|
|
94
|
-
var
|
|
93
|
+
var _a, _b, _c, _d;
|
|
94
|
+
var _e;
|
|
95
95
|
innerElement = innerElement instanceof Element ? innerElement.target : innerElement;
|
|
96
96
|
if (this.driver.isWeb) {
|
|
97
97
|
this._logger.log('Checking if web element with selector', this.selector, 'contains element', innerElement);
|
|
@@ -105,7 +105,7 @@ class Element {
|
|
|
105
105
|
if (await this.equals(innerElement))
|
|
106
106
|
return false;
|
|
107
107
|
// if the inner element region is contained in this element region, then it then could be assumed that the inner element is contained in this element
|
|
108
|
-
const contentRegion = await this.getAttribute('contentSize')
|
|
108
|
+
const contentRegion = (_c = (await ((_b = this.driver.helper) === null || _b === void 0 ? void 0 : _b.getContentRegion(this)))) !== null && _c !== void 0 ? _c : (await this.getAttribute('contentSize')
|
|
109
109
|
.then(data => {
|
|
110
110
|
const contentSize = JSON.parse(data);
|
|
111
111
|
return {
|
|
@@ -117,17 +117,13 @@ class Element {
|
|
|
117
117
|
: contentSize.height + contentSize.scrollableOffset,
|
|
118
118
|
};
|
|
119
119
|
})
|
|
120
|
-
.catch(
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
y: contentRegion.y,
|
|
125
|
-
width: Math.max((_c = contentSize === null || contentSize === void 0 ? void 0 : contentSize.width) !== null && _c !== void 0 ? _c : 0, contentRegion.width),
|
|
126
|
-
height: Math.max((_d = contentSize === null || contentSize === void 0 ? void 0 : contentSize.height) !== null && _d !== void 0 ? _d : 0, contentRegion.height),
|
|
127
|
-
};
|
|
120
|
+
.catch(err => {
|
|
121
|
+
this._logger.warn(`Unable to get the attribute 'contentSize' due to the following error: '${err.message}'`);
|
|
122
|
+
return this._spec.getElementRegion(this.driver.target, this.target);
|
|
123
|
+
}));
|
|
128
124
|
const innerRegion = await this._spec.getElementRegion(this.driver.target, innerElement);
|
|
129
|
-
const contains = utils.geometry.contains(
|
|
130
|
-
(
|
|
125
|
+
const contains = utils.geometry.contains(contentRegion, innerRegion);
|
|
126
|
+
(_d = (_e = this._state).containedElements) !== null && _d !== void 0 ? _d : (_e.containedElements = new Map());
|
|
131
127
|
this._state.containedElements.set(innerElement, contains);
|
|
132
128
|
return contains;
|
|
133
129
|
}
|
|
@@ -186,7 +182,7 @@ class Element {
|
|
|
186
182
|
if (this._state.contentSize)
|
|
187
183
|
return this._state.contentSize;
|
|
188
184
|
const size = await this.withRefresh(async () => {
|
|
189
|
-
var _a, _b
|
|
185
|
+
var _a, _b;
|
|
190
186
|
if (this.driver.isWeb) {
|
|
191
187
|
this._logger.log('Extracting content size of web element with selector', this.selector);
|
|
192
188
|
return this.context.execute(snippets.getElementContentSize, [this]);
|
|
@@ -194,7 +190,7 @@ class Element {
|
|
|
194
190
|
else {
|
|
195
191
|
this._logger.log('Extracting content size of native element with selector', this.selector);
|
|
196
192
|
try {
|
|
197
|
-
const contentRegion = await this.getAttribute('contentSize')
|
|
193
|
+
const contentRegion = (_b = (await ((_a = this.driver.helper) === null || _a === void 0 ? void 0 : _a.getContentRegion(this)))) !== null && _b !== void 0 ? _b : (await this.getAttribute('contentSize')
|
|
198
194
|
.then(data => {
|
|
199
195
|
const contentSize = JSON.parse(data);
|
|
200
196
|
return {
|
|
@@ -209,14 +205,9 @@ class Element {
|
|
|
209
205
|
.catch(err => {
|
|
210
206
|
this._logger.warn(`Unable to get the attribute 'contentSize' due to the following error: '${err.message}'`);
|
|
211
207
|
return this._spec.getElementRegion(this.driver.target, this.target);
|
|
212
|
-
});
|
|
213
|
-
this._logger.log('Extracted native content
|
|
214
|
-
|
|
215
|
-
this._logger.log('Extracted native content size with helper library', contentSize);
|
|
216
|
-
this._state.contentSize = {
|
|
217
|
-
width: Math.max((_b = contentSize === null || contentSize === void 0 ? void 0 : contentSize.width) !== null && _b !== void 0 ? _b : 0, contentRegion.width),
|
|
218
|
-
height: Math.max((_c = contentSize === null || contentSize === void 0 ? void 0 : contentSize.height) !== null && _c !== void 0 ? _c : 0, contentRegion.height),
|
|
219
|
-
};
|
|
208
|
+
}));
|
|
209
|
+
this._logger.log('Extracted native content region', contentRegion);
|
|
210
|
+
this._state.contentSize = utils.geometry.size(contentRegion);
|
|
220
211
|
if (this.driver.isAndroid) {
|
|
221
212
|
this._state.contentSize = utils.geometry.scale(this._state.contentSize, 1 / this.driver.pixelRatio);
|
|
222
213
|
}
|
|
@@ -293,15 +284,15 @@ class Element {
|
|
|
293
284
|
this._state.touchPadding = 10;
|
|
294
285
|
else if (this.driver.isAndroid) {
|
|
295
286
|
if (((_a = this.driver.helper) === null || _a === void 0 ? void 0 : _a.name) === 'android') {
|
|
296
|
-
this._state.touchPadding = await ((_b = this.driver.helper) === null || _b === void 0 ? void 0 : _b.getTouchPadding());
|
|
287
|
+
this._state.touchPadding = (await ((_b = this.driver.helper) === null || _b === void 0 ? void 0 : _b.getTouchPadding())) || 20;
|
|
297
288
|
}
|
|
298
|
-
|
|
289
|
+
else {
|
|
299
290
|
const touchPadding = await this.getAttribute('contentSize')
|
|
300
291
|
.then(data => JSON.parse(data).touchPadding)
|
|
301
292
|
.catch(err => {
|
|
302
293
|
this._logger.warn(`Unable to get the attribute 'contentSize' when looking up 'touchPadding' due to the following error: '${err.message}'`);
|
|
303
294
|
});
|
|
304
|
-
this._state.touchPadding = touchPadding
|
|
295
|
+
this._state.touchPadding = touchPadding || 20;
|
|
305
296
|
}
|
|
306
297
|
this._logger.log('Touch padding set:', this._state.touchPadding);
|
|
307
298
|
}
|
package/dist/fake/spec-driver.js
CHANGED
|
@@ -100,8 +100,7 @@ async function getDriverInfo(driver) {
|
|
|
100
100
|
}
|
|
101
101
|
exports.getDriverInfo = getDriverInfo;
|
|
102
102
|
async function getWindowSize(driver) {
|
|
103
|
-
|
|
104
|
-
return rect;
|
|
103
|
+
return utils.geometry.size(await driver.getWindowRect());
|
|
105
104
|
}
|
|
106
105
|
exports.getWindowSize = getWindowSize;
|
|
107
106
|
async function setWindowSize(driver, size) {
|
package/dist/helper-android.js
CHANGED
|
@@ -1,30 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
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);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.HelperAndroid = void 0;
|
|
27
|
-
const utils = __importStar(require("@applitools/utils"));
|
|
28
4
|
class HelperAndroid {
|
|
29
5
|
constructor(options) {
|
|
30
6
|
this._spec = options.spec;
|
|
@@ -55,7 +31,7 @@ class HelperAndroid {
|
|
|
55
31
|
return null;
|
|
56
32
|
return resourceId.split('/')[1];
|
|
57
33
|
}
|
|
58
|
-
async
|
|
34
|
+
async getContentRegion(element) {
|
|
59
35
|
let contentHeightString;
|
|
60
36
|
if (this._legacy) {
|
|
61
37
|
await this._input.click();
|
|
@@ -75,9 +51,9 @@ class HelperAndroid {
|
|
|
75
51
|
}
|
|
76
52
|
const region = await this._spec.getElementRegion(this._input.driver.target, element.target);
|
|
77
53
|
const contentHeight = Number(contentHeightString);
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
54
|
+
return !Number.isNaN(contentHeight) && contentHeight >= region.height
|
|
55
|
+
? { x: region.x, y: region.y, width: region.width, height: contentHeight }
|
|
56
|
+
: null;
|
|
81
57
|
}
|
|
82
58
|
async getRegion(element) {
|
|
83
59
|
if (this._legacy)
|
package/dist/helper-ios.js
CHANGED
|
@@ -14,8 +14,9 @@ class HelperIOS {
|
|
|
14
14
|
const element = await driver.element({ type: 'name', selector: 'applitools_grab_scrollable_data_button' });
|
|
15
15
|
return element ? new HelperIOS({ driver, element, spec, logger }) : null;
|
|
16
16
|
}
|
|
17
|
-
async
|
|
17
|
+
async getContentRegion(element) {
|
|
18
18
|
await this._element.click();
|
|
19
|
+
const region = await this._spec.getElementRegion(this._driver.target, element.target);
|
|
19
20
|
const sizeLabel = await this._driver.element({ type: 'name', selector: 'applitools_content_size_label' });
|
|
20
21
|
const sizeString = await (sizeLabel === null || sizeLabel === void 0 ? void 0 : sizeLabel.getText());
|
|
21
22
|
if (!sizeString)
|
|
@@ -26,15 +27,15 @@ class HelperIOS {
|
|
|
26
27
|
return null;
|
|
27
28
|
const paddingLabel = await this._driver.element({ type: 'name', selector: 'applitools_content_offset_label' });
|
|
28
29
|
const paddingString = await (paddingLabel === null || paddingLabel === void 0 ? void 0 : paddingLabel.getText());
|
|
29
|
-
if (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return contentSize;
|
|
30
|
+
if (paddingString) {
|
|
31
|
+
const [, x, y] = paddingString.match(/\{(-?\d+(?:\.\d+)?),\s?(-?\d+(?:\.\d+)?)\}/);
|
|
32
|
+
const contentOffset = { x: Number(x), y: Number(y) };
|
|
33
|
+
if (!Number.isNaN(contentOffset.x))
|
|
34
|
+
contentSize.width -= contentOffset.x;
|
|
35
|
+
if (!Number.isNaN(contentOffset.y))
|
|
36
|
+
contentSize.height -= contentOffset.y;
|
|
37
|
+
}
|
|
38
|
+
return contentSize.height >= region.height ? { x: region.x, y: region.y, ...contentSize } : null;
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
exports.HelperIOS = HelperIOS;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/driver",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.16",
|
|
4
4
|
"description": "Applitools universal framework wrapper",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"applitools",
|
|
@@ -85,6 +85,7 @@
|
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
87
|
"@applitools/bongo": "^2.1.6",
|
|
88
|
+
"@applitools/scripts": "^1.1.0",
|
|
88
89
|
"@types/mocha": "^9.1.1",
|
|
89
90
|
"@types/node": "^17.0.31",
|
|
90
91
|
"@typescript-eslint/eslint-plugin": "^5.22.0",
|
|
@@ -22,7 +22,7 @@ export declare class HelperAndroid<TDriver, TContext, TElement, TSelector> {
|
|
|
22
22
|
logger?: any;
|
|
23
23
|
});
|
|
24
24
|
_getElementId(element: Element<TDriver, TContext, TElement, TSelector>): Promise<string>;
|
|
25
|
-
|
|
25
|
+
getContentRegion(element: Element<TDriver, TContext, TElement, TSelector>): Promise<types.Region>;
|
|
26
26
|
getRegion(element: Element<TDriver, TContext, TElement, TSelector>): Promise<types.Region>;
|
|
27
27
|
scrollToTop(element: Element<TDriver, TContext, TElement, TSelector>): Promise<void>;
|
|
28
28
|
scrollBy(element: Element<TDriver, TContext, TElement, TSelector>, offset: types.Location): Promise<void>;
|
package/types/helper-ios.d.ts
CHANGED
|
@@ -19,5 +19,5 @@ export declare class HelperIOS<TDriver, TContext, TElement, TSelector> {
|
|
|
19
19
|
spec: types.SpecDriver<TDriver, TContext, TElement, TSelector>;
|
|
20
20
|
logger?: Logger;
|
|
21
21
|
});
|
|
22
|
-
|
|
22
|
+
getContentRegion(element: Element<TDriver, TContext, TElement, TSelector>): Promise<types.Region>;
|
|
23
23
|
}
|