@applitools/driver 1.19.7 → 1.20.1
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 +19 -0
- package/dist/driver.js +4 -4
- package/package.json +4 -4
- package/types/driver.d.ts +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.20.1](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.20.0...js/driver@1.20.1) (2024-12-18)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Dependencies
|
|
7
|
+
|
|
8
|
+
* @applitools/utils bumped to 1.7.6
|
|
9
|
+
#### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* support webdriver.io 9 ([baee5ce](https://github.com/Applitools-Dev/sdk/commit/baee5ce96e8220c337b007e3a517b5546ce0fedc))
|
|
12
|
+
* @applitools/logger bumped to 2.0.20
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [1.20.0](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.19.7...js/driver@1.20.0) (2024-11-12)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* add an option to keep the navigation bar for android devices ([#2608](https://github.com/Applitools-Dev/sdk/issues/2608)) ([e7647e0](https://github.com/Applitools-Dev/sdk/commit/e7647e0105a7aa47e6bf3b20ab033f1e389ca849))
|
|
21
|
+
|
|
3
22
|
## [1.19.7](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.19.6...js/driver@1.19.7) (2024-11-07)
|
|
4
23
|
|
|
5
24
|
|
package/dist/driver.js
CHANGED
|
@@ -305,7 +305,7 @@ class Driver {
|
|
|
305
305
|
}
|
|
306
306
|
return this._environment;
|
|
307
307
|
}
|
|
308
|
-
async getViewport() {
|
|
308
|
+
async getViewport({ keepNavigationBar } = {}) {
|
|
309
309
|
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;
|
|
310
310
|
var _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15;
|
|
311
311
|
if (!this._viewport) {
|
|
@@ -342,9 +342,9 @@ class Driver {
|
|
|
342
342
|
this._viewport.statusBarSize = Math.max((_g = this._viewport.statusBarSize) !== null && _g !== void 0 ? _g : 0, statusBarSize);
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
|
-
if (navigationBar === null || navigationBar === void 0 ? void 0 : navigationBar.visible) {
|
|
345
|
+
if ((navigationBar === null || navigationBar === void 0 ? void 0 : navigationBar.visible) && !keepNavigationBar) {
|
|
346
346
|
this._logger.log('Driver navigation size', navigationBar);
|
|
347
|
-
// if navigation bar is placed on the right side
|
|
347
|
+
// if navigation bar is placed on the right side of the screen then the orientation is landscape-secondary
|
|
348
348
|
if (navigationBar.x > 0)
|
|
349
349
|
this._viewport.orientation = 'landscape-secondary';
|
|
350
350
|
// navigation bar size could be its height or width depending on screen orientation
|
|
@@ -385,7 +385,7 @@ class Driver {
|
|
|
385
385
|
if (!this._viewport.viewportSize) {
|
|
386
386
|
this._viewport.viewportSize = { ...this._viewport.displaySize };
|
|
387
387
|
this._viewport.viewportSize.height -= this._viewport.statusBarSize;
|
|
388
|
-
if (environment.isAndroid) {
|
|
388
|
+
if (environment.isAndroid && !keepNavigationBar) {
|
|
389
389
|
this._viewport.viewportSize[((_u = this._viewport.orientation) === null || _u === void 0 ? void 0 : _u.startsWith('landscape')) ? 'width' : 'height'] -=
|
|
390
390
|
this._viewport.navigationBarSize;
|
|
391
391
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/driver",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.1",
|
|
4
4
|
"description": "Applitools universal framework wrapper",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"applitools",
|
|
@@ -73,9 +73,9 @@
|
|
|
73
73
|
"test": "run --top-level mocha './test/**/*.spec.ts'"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@applitools/logger": "2.0.
|
|
77
|
-
"@applitools/snippets": "2.6.
|
|
78
|
-
"@applitools/utils": "1.7.
|
|
76
|
+
"@applitools/logger": "2.0.20",
|
|
77
|
+
"@applitools/snippets": "2.6.3",
|
|
78
|
+
"@applitools/utils": "1.7.6",
|
|
79
79
|
"semver": "7.6.2"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
package/types/driver.d.ts
CHANGED
|
@@ -71,7 +71,9 @@ export declare class Driver<T extends SpecType> {
|
|
|
71
71
|
force?: boolean;
|
|
72
72
|
}): Promise<string | undefined>;
|
|
73
73
|
getEnvironment(): Promise<Environment>;
|
|
74
|
-
getViewport(
|
|
74
|
+
getViewport({ keepNavigationBar }?: {
|
|
75
|
+
keepNavigationBar?: boolean;
|
|
76
|
+
}): Promise<Viewport>;
|
|
75
77
|
getFeatures(): Promise<Features>;
|
|
76
78
|
getSessionId(): Promise<string | null>;
|
|
77
79
|
getDriverUrl(): Promise<string | null>;
|