@applitools/driver 1.11.29 → 1.11.31
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 +47 -50
- package/dist/element.js +18 -14
- package/package.json +3 -3
- package/types/driver.d.ts +1 -3
package/dist/driver.js
CHANGED
|
@@ -64,9 +64,6 @@ class Driver {
|
|
|
64
64
|
get mainContext() {
|
|
65
65
|
return this._mainContext;
|
|
66
66
|
}
|
|
67
|
-
get helper() {
|
|
68
|
-
return this._helper;
|
|
69
|
-
}
|
|
70
67
|
get features() {
|
|
71
68
|
var _a;
|
|
72
69
|
return (_a = this._driverInfo) === null || _a === void 0 ? void 0 : _a.features;
|
|
@@ -179,8 +176,8 @@ class Driver {
|
|
|
179
176
|
this._currentContext = context;
|
|
180
177
|
}
|
|
181
178
|
async init() {
|
|
182
|
-
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, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18
|
|
183
|
-
var _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33
|
|
179
|
+
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, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18;
|
|
180
|
+
var _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33;
|
|
184
181
|
// NOTE: this is here because saucelabs does not provide right capabilities for the first call
|
|
185
182
|
await ((_b = (_a = this._spec).getCapabilities) === null || _b === void 0 ? void 0 : _b.call(_a, this.target));
|
|
186
183
|
const capabilities = await ((_d = (_c = this._spec).getCapabilities) === null || _d === void 0 ? void 0 : _d.call(_c, this.target));
|
|
@@ -188,7 +185,7 @@ class Driver {
|
|
|
188
185
|
const capabilitiesInfo = capabilities ? (0, capabilities_1.parseCapabilities)(capabilities) : undefined;
|
|
189
186
|
const driverInfo = await ((_f = (_e = this._spec).getDriverInfo) === null || _f === void 0 ? void 0 : _f.call(_e, this.target));
|
|
190
187
|
this._driverInfo = { ...capabilitiesInfo, ...driverInfo };
|
|
191
|
-
(_g = (
|
|
188
|
+
(_g = (_19 = this._driverInfo).remoteHostname) !== null && _g !== void 0 ? _g : (_19.remoteHostname = (_k = (_j = (_h = this._spec).extractHostName) === null || _j === void 0 ? void 0 : _j.call(_h, this.target)) !== null && _k !== void 0 ? _k : undefined);
|
|
192
189
|
if (this.isMobile) {
|
|
193
190
|
this._driverInfo.orientation =
|
|
194
191
|
(_l = (await this.getOrientation().catch(() => undefined))) !== null && _l !== void 0 ? _l : this._driverInfo.orientation;
|
|
@@ -197,54 +194,50 @@ class Driver {
|
|
|
197
194
|
}
|
|
198
195
|
if (this.isWeb) {
|
|
199
196
|
const browserInfo = await this.currentContext.executePoll(snippets.getBrowserInfo);
|
|
200
|
-
(_m = (
|
|
201
|
-
(_o = (
|
|
202
|
-
(_p = (
|
|
203
|
-
if (browserInfo.userAgentData) {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}
|
|
210
|
-
else if (this.isMac && Number.parseInt(this.browserVersion) >= 90) {
|
|
211
|
-
this._driverInfo.platformVersion = (_t = browserInfo.platformVersion) !== null && _t !== void 0 ? _t : this._driverInfo.platformVersion;
|
|
212
|
-
}
|
|
197
|
+
(_m = (_20 = this._driverInfo).userAgent) !== null && _m !== void 0 ? _m : (_20.userAgent = browserInfo.userAgent);
|
|
198
|
+
(_o = (_21 = this._driverInfo).pixelRatio) !== null && _o !== void 0 ? _o : (_21.pixelRatio = browserInfo.pixelRatio);
|
|
199
|
+
(_p = (_22 = this._driverInfo).viewportScale) !== null && _p !== void 0 ? _p : (_22.viewportScale = browserInfo.viewportScale);
|
|
200
|
+
if (browserInfo.userAgentData && this.isChromium) {
|
|
201
|
+
if (this.isWindows && Number.parseInt(this.browserVersion) >= 107) {
|
|
202
|
+
this._driverInfo.platformVersion = (_q = browserInfo.platformVersion) !== null && _q !== void 0 ? _q : this._driverInfo.platformVersion;
|
|
203
|
+
}
|
|
204
|
+
else if (this.isMac && Number.parseInt(this.browserVersion) >= 90) {
|
|
205
|
+
this._driverInfo.platformVersion = (_r = browserInfo.platformVersion) !== null && _r !== void 0 ? _r : this._driverInfo.platformVersion;
|
|
213
206
|
}
|
|
214
207
|
}
|
|
215
208
|
if (this._driverInfo.userAgent) {
|
|
216
209
|
const userAgentInfo = (0, user_agent_1.parseUserAgent)(this._driverInfo.userAgent);
|
|
217
210
|
const userAgentDataInfo = browserInfo.userAgentData && (0, user_agent_data_1.parseUserAgentData)(browserInfo.userAgentData);
|
|
218
211
|
this._driverInfo.browserName =
|
|
219
|
-
(
|
|
212
|
+
(_t = (_s = userAgentInfo.browserName) !== null && _s !== void 0 ? _s : userAgentDataInfo === null || userAgentDataInfo === void 0 ? void 0 : userAgentDataInfo.browserName) !== null && _t !== void 0 ? _t : this._driverInfo.browserName;
|
|
220
213
|
this._driverInfo.browserVersion =
|
|
221
|
-
(
|
|
222
|
-
(
|
|
223
|
-
(
|
|
214
|
+
(_v = (_u = userAgentInfo.browserVersion) !== null && _u !== void 0 ? _u : userAgentDataInfo === null || userAgentDataInfo === void 0 ? void 0 : userAgentDataInfo.browserVersion) !== null && _v !== void 0 ? _v : this._driverInfo.browserVersion;
|
|
215
|
+
(_w = (_23 = this._driverInfo).isMobile) !== null && _w !== void 0 ? _w : (_23.isMobile = userAgentDataInfo === null || userAgentDataInfo === void 0 ? void 0 : userAgentDataInfo.isMobile);
|
|
216
|
+
(_x = (_24 = this._driverInfo).isChromium) !== null && _x !== void 0 ? _x : (_24.isChromium = userAgentDataInfo === null || userAgentDataInfo === void 0 ? void 0 : userAgentDataInfo.isChromium);
|
|
224
217
|
if (this._driverInfo.isMobile) {
|
|
225
|
-
(
|
|
226
|
-
(
|
|
218
|
+
(_y = (_25 = this._driverInfo).platformName) !== null && _y !== void 0 ? _y : (_25.platformName = (_z = userAgentDataInfo === null || userAgentDataInfo === void 0 ? void 0 : userAgentDataInfo.platformName) !== null && _z !== void 0 ? _z : userAgentInfo.platformName);
|
|
219
|
+
(_0 = (_26 = this._driverInfo).platformVersion) !== null && _0 !== void 0 ? _0 : (_26.platformVersion = (_1 = userAgentDataInfo === null || userAgentDataInfo === void 0 ? void 0 : userAgentDataInfo.platformVersion) !== null && _1 !== void 0 ? _1 : userAgentInfo.platformVersion);
|
|
227
220
|
}
|
|
228
221
|
else {
|
|
229
222
|
this._driverInfo.platformName =
|
|
230
|
-
(
|
|
223
|
+
(_3 = (_2 = userAgentDataInfo === null || userAgentDataInfo === void 0 ? void 0 : userAgentDataInfo.platformName) !== null && _2 !== void 0 ? _2 : userAgentInfo.platformName) !== null && _3 !== void 0 ? _3 : this._driverInfo.platformName;
|
|
231
224
|
this._driverInfo.platformVersion =
|
|
232
|
-
(
|
|
225
|
+
(_5 = (_4 = userAgentDataInfo === null || userAgentDataInfo === void 0 ? void 0 : userAgentDataInfo.platformVersion) !== null && _4 !== void 0 ? _4 : userAgentInfo.platformVersion) !== null && _5 !== void 0 ? _5 : this._driverInfo.platformVersion;
|
|
233
226
|
}
|
|
234
227
|
}
|
|
235
228
|
if (!this.isMobile && (this.isAndroid || this.isIOS)) {
|
|
236
229
|
this._driverInfo.isMobile = true;
|
|
237
230
|
this._driverInfo.isEmulation = this._driverInfo.isChrome;
|
|
238
231
|
}
|
|
239
|
-
(
|
|
240
|
-
(
|
|
232
|
+
(_6 = (_27 = this._driverInfo).features) !== null && _6 !== void 0 ? _6 : (_27.features = {});
|
|
233
|
+
(_7 = (_28 = this._driverInfo.features).allCookies) !== null && _7 !== void 0 ? _7 : (_28.allCookies = this._driverInfo.isChrome ||
|
|
241
234
|
(!!this._driverInfo.browserName && /chrome/i.test(this._driverInfo.browserName) && !this._driverInfo.isMobile));
|
|
242
235
|
}
|
|
243
236
|
else {
|
|
244
237
|
// this value always excludes the height of the navigation bar, and sometimes it also excludes the height of the status bar
|
|
245
238
|
let windowSize = await this._spec.getWindowSize(this.target);
|
|
246
|
-
(
|
|
247
|
-
if (((
|
|
239
|
+
(_8 = (_29 = this._driverInfo).displaySize) !== null && _8 !== void 0 ? _8 : (_29.displaySize = windowSize);
|
|
240
|
+
if (((_9 = this.orientation) === null || _9 === void 0 ? void 0 : _9.startsWith('landscape')) &&
|
|
248
241
|
this._driverInfo.displaySize.height > this._driverInfo.displaySize.width) {
|
|
249
242
|
this._driverInfo.displaySize = {
|
|
250
243
|
width: this._driverInfo.displaySize.height,
|
|
@@ -253,14 +246,14 @@ class Driver {
|
|
|
253
246
|
}
|
|
254
247
|
if (this.isAndroid) {
|
|
255
248
|
// bar sizes could be extracted only on android
|
|
256
|
-
const systemBars = await ((
|
|
249
|
+
const systemBars = await ((_11 = (_10 = this._spec).getSystemBars) === null || _11 === void 0 ? void 0 : _11.call(_10, this.target).catch(() => null));
|
|
257
250
|
const { statusBar, navigationBar } = systemBars !== null && systemBars !== void 0 ? systemBars : {};
|
|
258
251
|
if (statusBar === null || statusBar === void 0 ? void 0 : statusBar.visible) {
|
|
259
252
|
this._logger.log('Driver status bar', statusBar);
|
|
260
253
|
const statusBarSize = statusBar.height;
|
|
261
254
|
// when status bar is overlapping content on android it returns status bar height equal to display height
|
|
262
255
|
if (statusBarSize < this._driverInfo.displaySize.height) {
|
|
263
|
-
this._driverInfo.statusBarSize = Math.max((
|
|
256
|
+
this._driverInfo.statusBarSize = Math.max((_12 = this._driverInfo.statusBarSize) !== null && _12 !== void 0 ? _12 : 0, statusBarSize);
|
|
264
257
|
}
|
|
265
258
|
}
|
|
266
259
|
if (navigationBar === null || navigationBar === void 0 ? void 0 : navigationBar.visible) {
|
|
@@ -269,28 +262,28 @@ class Driver {
|
|
|
269
262
|
if (navigationBar.x > 0)
|
|
270
263
|
this._driverInfo.orientation = 'landscape-secondary';
|
|
271
264
|
// navigation bar size could be its height or width depending on screen orientation
|
|
272
|
-
const navigationBarSize = navigationBar[((
|
|
265
|
+
const navigationBarSize = navigationBar[((_13 = this.orientation) === null || _13 === void 0 ? void 0 : _13.startsWith('landscape')) ? 'width' : 'height'];
|
|
273
266
|
// when navigation bar is invisible on android it returns navigation bar size equal to display size
|
|
274
267
|
if (navigationBarSize <
|
|
275
|
-
this._driverInfo.displaySize[((
|
|
276
|
-
this._driverInfo.navigationBarSize = Math.max((
|
|
268
|
+
this._driverInfo.displaySize[((_14 = this.orientation) === null || _14 === void 0 ? void 0 : _14.startsWith('landscape')) ? 'width' : 'height']) {
|
|
269
|
+
this._driverInfo.navigationBarSize = Math.max((_15 = this._driverInfo.navigationBarSize) !== null && _15 !== void 0 ? _15 : 0, navigationBarSize);
|
|
277
270
|
}
|
|
278
271
|
else {
|
|
279
272
|
this._driverInfo.navigationBarSize = 0;
|
|
280
273
|
}
|
|
281
274
|
}
|
|
282
275
|
// bar sizes have to be scaled on android
|
|
283
|
-
(
|
|
284
|
-
(
|
|
276
|
+
(_30 = this._driverInfo).statusBarSize && (_30.statusBarSize = this._driverInfo.statusBarSize / this.pixelRatio);
|
|
277
|
+
(_31 = this._driverInfo).navigationBarSize && (_31.navigationBarSize = this._driverInfo.navigationBarSize / this.pixelRatio);
|
|
285
278
|
windowSize = utils.geometry.scale(windowSize, 1 / this.pixelRatio);
|
|
286
|
-
(
|
|
279
|
+
(_32 = this._driverInfo).displaySize && (_32.displaySize = utils.geometry.scale(this._driverInfo.displaySize, 1 / this.pixelRatio));
|
|
287
280
|
}
|
|
288
281
|
if (this.isIOS) {
|
|
289
|
-
if ((
|
|
282
|
+
if ((_16 = this.orientation) === null || _16 === void 0 ? void 0 : _16.startsWith('landscape'))
|
|
290
283
|
this._driverInfo.statusBarSize = 0;
|
|
291
284
|
}
|
|
292
285
|
// calculate viewport location
|
|
293
|
-
(
|
|
286
|
+
(_17 = (_33 = this._driverInfo).viewportLocation) !== null && _17 !== void 0 ? _17 : (_33.viewportLocation = {
|
|
294
287
|
x: this.orientation === 'landscape' ? this.navigationBarSize : 0,
|
|
295
288
|
y: this.statusBarSize,
|
|
296
289
|
});
|
|
@@ -299,7 +292,7 @@ class Driver {
|
|
|
299
292
|
this._driverInfo.viewportSize = { ...this._driverInfo.displaySize };
|
|
300
293
|
this._driverInfo.viewportSize.height -= this.statusBarSize;
|
|
301
294
|
if (this.isAndroid) {
|
|
302
|
-
this._driverInfo.viewportSize[((
|
|
295
|
+
this._driverInfo.viewportSize[((_18 = this.orientation) === null || _18 === void 0 ? void 0 : _18.startsWith('landscape')) ? 'width' : 'height'] -=
|
|
303
296
|
this.navigationBarSize;
|
|
304
297
|
}
|
|
305
298
|
}
|
|
@@ -326,18 +319,22 @@ class Driver {
|
|
|
326
319
|
this._driverInfo.safeArea.height -= bottomOffset;
|
|
327
320
|
}
|
|
328
321
|
}
|
|
329
|
-
// TODO: if user opts into NML, skip initializing the helpers
|
|
330
|
-
// init helper lib
|
|
331
|
-
if (!((_21 = this._customConfig) === null || _21 === void 0 ? void 0 : _21.disableHelper)) {
|
|
332
|
-
this._helper = this.isIOS
|
|
333
|
-
? await helper_ios_1.HelperIOS.make({ spec: this._spec, driver: this, logger: this._logger })
|
|
334
|
-
: await helper_android_1.HelperAndroid.make({ spec: this._spec, driver: this, logger: this._logger });
|
|
335
|
-
}
|
|
336
|
-
this._logger.log(`Helper set to ${(_22 = this._helper) === null || _22 === void 0 ? void 0 : _22.name}`);
|
|
337
322
|
}
|
|
338
323
|
this._logger.log('Combined driver info', this._driverInfo);
|
|
339
324
|
return this;
|
|
340
325
|
}
|
|
326
|
+
async getHelper() {
|
|
327
|
+
var _a, _b, _c;
|
|
328
|
+
if (this._helper === undefined) {
|
|
329
|
+
this._logger.log(`Extracting helper for ${this.isIOS ? 'ios' : 'android'}`);
|
|
330
|
+
this._helper = this.isIOS
|
|
331
|
+
? await helper_ios_1.HelperIOS.make({ spec: this._spec, driver: this, logger: this._logger })
|
|
332
|
+
: await helper_android_1.HelperAndroid.make({ spec: this._spec, driver: this, logger: this._logger });
|
|
333
|
+
this._logger.log(`Extracted helper of type ${(_a = this._helper) === null || _a === void 0 ? void 0 : _a.name}`);
|
|
334
|
+
}
|
|
335
|
+
this._logger.log(`Returning helper for of type ${(_c = (_b = this._helper) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : null}`);
|
|
336
|
+
return this._helper;
|
|
337
|
+
}
|
|
341
338
|
// begin world
|
|
342
339
|
//
|
|
343
340
|
// About the concept of a "World":
|
package/dist/element.js
CHANGED
|
@@ -173,11 +173,12 @@ class Element {
|
|
|
173
173
|
return region;
|
|
174
174
|
}
|
|
175
175
|
async getContentRegion(options = {}) {
|
|
176
|
-
var _a, _b
|
|
176
|
+
var _a, _b;
|
|
177
177
|
if (!this.driver.isNative)
|
|
178
178
|
return null;
|
|
179
179
|
this._logger.log('Extracting content region of native element with selector', this.selector);
|
|
180
|
-
|
|
180
|
+
const helper = await this.driver.getHelper();
|
|
181
|
+
let contentRegion = await (helper === null || helper === void 0 ? void 0 : helper.getContentRegion(this, options));
|
|
181
182
|
this._logger.log('Extracted content region using helper library', contentRegion);
|
|
182
183
|
if (!contentRegion || !this.driver.isAndroid) {
|
|
183
184
|
let attrContentRegion = null;
|
|
@@ -224,8 +225,8 @@ class Element {
|
|
|
224
225
|
contentRegion = {
|
|
225
226
|
x: attrContentRegion.x,
|
|
226
227
|
y: attrContentRegion.y,
|
|
227
|
-
width: Math.max((
|
|
228
|
-
height: Math.max((
|
|
228
|
+
width: Math.max((_a = contentRegion === null || contentRegion === void 0 ? void 0 : contentRegion.width) !== null && _a !== void 0 ? _a : 0, attrContentRegion.width),
|
|
229
|
+
height: Math.max((_b = contentRegion === null || contentRegion === void 0 ? void 0 : contentRegion.height) !== null && _b !== void 0 ? _b : 0, attrContentRegion.height),
|
|
229
230
|
};
|
|
230
231
|
}
|
|
231
232
|
}
|
|
@@ -312,16 +313,17 @@ class Element {
|
|
|
312
313
|
return this._spec.executeScript(this.context.target, snippets.getShadowRoot, [this.target]);
|
|
313
314
|
}
|
|
314
315
|
async getTouchPadding() {
|
|
315
|
-
var _a
|
|
316
|
-
var
|
|
316
|
+
var _a;
|
|
317
|
+
var _b;
|
|
317
318
|
if (this._state.touchPadding == null) {
|
|
318
319
|
if (this.driver.isWeb)
|
|
319
320
|
this._state.touchPadding = 0;
|
|
320
321
|
else if (this.driver.isIOS)
|
|
321
322
|
this._state.touchPadding = 10;
|
|
322
323
|
else if (this.driver.isAndroid) {
|
|
323
|
-
|
|
324
|
-
|
|
324
|
+
const helper = await this.driver.getHelper();
|
|
325
|
+
if ((helper === null || helper === void 0 ? void 0 : helper.name) === 'android') {
|
|
326
|
+
this._state.touchPadding = await helper.getTouchPadding();
|
|
325
327
|
this._logger.log('Touch padding extracted using helper library', this._state.touchPadding);
|
|
326
328
|
}
|
|
327
329
|
if (!this._state.touchPadding) {
|
|
@@ -332,7 +334,7 @@ class Element {
|
|
|
332
334
|
});
|
|
333
335
|
this._logger.log('Touch padding extracted using attribute', this._state.touchPadding);
|
|
334
336
|
}
|
|
335
|
-
(
|
|
337
|
+
(_a = (_b = this._state).touchPadding) !== null && _a !== void 0 ? _a : (_b.touchPadding = 20);
|
|
336
338
|
this._logger.log('Touch padding set:', this._state.touchPadding);
|
|
337
339
|
}
|
|
338
340
|
}
|
|
@@ -398,7 +400,6 @@ class Element {
|
|
|
398
400
|
}
|
|
399
401
|
async scrollTo(offset, options) {
|
|
400
402
|
return this.withRefresh(async () => {
|
|
401
|
-
var _a;
|
|
402
403
|
this._logger.log(`Scrolling to offset (${offset.x}, ${offset.y}) element with selector`, this.selector);
|
|
403
404
|
offset = utils.geometry.round({ x: Math.max(offset.x, 0), y: Math.max(offset.y, 0) });
|
|
404
405
|
if (this.driver.isWeb) {
|
|
@@ -412,10 +413,13 @@ class Element {
|
|
|
412
413
|
const currentScrollOffset = await this.getScrollOffset();
|
|
413
414
|
if (!(options === null || options === void 0 ? void 0 : options.force) && utils.geometry.equals(offset, currentScrollOffset))
|
|
414
415
|
return currentScrollOffset;
|
|
415
|
-
if (
|
|
416
|
-
await this.driver.
|
|
417
|
-
|
|
418
|
-
|
|
416
|
+
if (utils.geometry.equals(offset, { x: 0, y: 0 }) && this.driver.isAndroid) {
|
|
417
|
+
const helper = await this.driver.getHelper();
|
|
418
|
+
if ((helper === null || helper === void 0 ? void 0 : helper.name) === 'android') {
|
|
419
|
+
await helper.scrollToTop(this);
|
|
420
|
+
this._state.scrollOffset = offset;
|
|
421
|
+
return this._state.scrollOffset;
|
|
422
|
+
}
|
|
419
423
|
}
|
|
420
424
|
const contentSize = await this.getContentSize();
|
|
421
425
|
const scrollableRegion = await this.getClientRegion();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/driver",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.31",
|
|
4
4
|
"description": "Applitools universal framework wrapper",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"applitools",
|
|
@@ -82,13 +82,13 @@
|
|
|
82
82
|
"postversion": "bongo postversion --skip-release-notification"
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
|
-
"@applitools/logger": "1.1.
|
|
85
|
+
"@applitools/logger": "1.1.46",
|
|
86
86
|
"@applitools/snippets": "2.4.15",
|
|
87
87
|
"@applitools/utils": "1.3.30",
|
|
88
88
|
"semver": "7.3.7"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
|
-
"@applitools/bongo": "^2.2.
|
|
91
|
+
"@applitools/bongo": "^2.2.5",
|
|
92
92
|
"@types/mocha": "^9.1.1",
|
|
93
93
|
"@types/node": "12",
|
|
94
94
|
"mocha": "^10.0.0"
|
package/types/driver.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ type DriverOptions<T extends SpecType> = {
|
|
|
14
14
|
logger?: Logger;
|
|
15
15
|
customConfig?: {
|
|
16
16
|
useCeilForViewportSize?: boolean;
|
|
17
|
-
disableHelper?: boolean;
|
|
18
17
|
};
|
|
19
18
|
};
|
|
20
19
|
export declare class Driver<T extends SpecType> {
|
|
@@ -31,7 +30,6 @@ export declare class Driver<T extends SpecType> {
|
|
|
31
30
|
get target(): T['driver'];
|
|
32
31
|
get currentContext(): Context<T>;
|
|
33
32
|
get mainContext(): Context<T>;
|
|
34
|
-
get helper(): HelperAndroid<T> | HelperIOS<T> | null | undefined;
|
|
35
33
|
get features(): {
|
|
36
34
|
shadowSelector?: boolean | undefined;
|
|
37
35
|
allCookies?: boolean | undefined;
|
|
@@ -66,6 +64,7 @@ export declare class Driver<T extends SpecType> {
|
|
|
66
64
|
get remoteHostname(): string | undefined;
|
|
67
65
|
updateCurrentContext(context: Context<T>): void;
|
|
68
66
|
init(): Promise<this>;
|
|
67
|
+
getHelper(): Promise<HelperAndroid<T> | HelperIOS<T> | null>;
|
|
69
68
|
switchWorld(options?: {
|
|
70
69
|
id?: string;
|
|
71
70
|
restoreState?: boolean;
|
|
@@ -110,7 +109,6 @@ export declare function makeDriver<T extends SpecType>(options: {
|
|
|
110
109
|
logger?: Logger;
|
|
111
110
|
customConfig?: {
|
|
112
111
|
useCeilForViewportSize?: boolean;
|
|
113
|
-
disableHelper?: boolean;
|
|
114
112
|
};
|
|
115
113
|
}): Promise<Driver<T>>;
|
|
116
114
|
export {};
|