@applitools/driver 1.17.5 → 1.18.0
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 +12 -0
- package/dist/driver.js +5 -2
- package/package.json +1 -1
- package/types/driver.d.ts +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.18.0](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.17.5...js/driver@1.18.0) (2024-07-23)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* disable broker url cache ([#2428](https://github.com/Applitools-Dev/sdk/issues/2428)) ([cb8d5fe](https://github.com/Applitools-Dev/sdk/commit/cb8d5fefb13d3ab42984d2bd4d4ac3d4e10646b0))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* executing web script on mobile environment ([#2380](https://github.com/Applitools-Dev/sdk/issues/2380)) ([da2e551](https://github.com/Applitools-Dev/sdk/commit/da2e551e01082d3cc21b9da5b43e6680233c080d))
|
|
14
|
+
|
|
3
15
|
## [1.17.5](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.17.4...js/driver@1.17.5) (2024-06-26)
|
|
4
16
|
|
|
5
17
|
|
package/dist/driver.js
CHANGED
|
@@ -89,7 +89,7 @@ class Driver {
|
|
|
89
89
|
await (scrollingElement === null || scrollingElement === void 0 ? void 0 : scrollingElement.refresh());
|
|
90
90
|
return refreshThis;
|
|
91
91
|
}
|
|
92
|
-
async refresh({ reset } = {}) {
|
|
92
|
+
async refresh({ reset, name } = {}) {
|
|
93
93
|
if (reset) {
|
|
94
94
|
if (utils.general.getEnvValue('AVOID_DRIVER_STATE_REST', 'boolean')) {
|
|
95
95
|
this._logger.log(`Skipping reset of the driver state`);
|
|
@@ -103,6 +103,9 @@ class Driver {
|
|
|
103
103
|
this._state = {};
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
+
if (name === 'NATIVE_APP') {
|
|
107
|
+
return reset ? resetReference(this) : this;
|
|
108
|
+
}
|
|
106
109
|
const spec = this._spec;
|
|
107
110
|
let currentContext = this.currentContext.target;
|
|
108
111
|
let contextInfo;
|
|
@@ -538,7 +541,7 @@ class Driver {
|
|
|
538
541
|
}
|
|
539
542
|
try {
|
|
540
543
|
await this._spec.switchWorld(this.target, name);
|
|
541
|
-
await this.refresh({ reset: true });
|
|
544
|
+
await this.refresh({ reset: true, name });
|
|
542
545
|
}
|
|
543
546
|
catch (error) {
|
|
544
547
|
this._logger.error('Unable to switch world due to the error', error);
|
package/package.json
CHANGED
package/types/driver.d.ts
CHANGED
|
@@ -32,14 +32,15 @@ export declare class Driver<T extends SpecType> {
|
|
|
32
32
|
constructor(options: DriverOptions<T>);
|
|
33
33
|
get logger(): Logger;
|
|
34
34
|
get target(): T['driver'];
|
|
35
|
-
get guid(): string
|
|
35
|
+
get guid(): string;
|
|
36
36
|
get currentContext(): Context<T>;
|
|
37
37
|
get mainContext(): Context<T>;
|
|
38
38
|
updateLogger(logger: Logger): void;
|
|
39
39
|
updateCurrentContext(context: Context<T>): void;
|
|
40
40
|
reloadPage(): Promise<this>;
|
|
41
|
-
refresh({ reset }?: {
|
|
41
|
+
refresh({ reset, name }?: {
|
|
42
42
|
reset?: boolean;
|
|
43
|
+
name?: string;
|
|
43
44
|
}): Promise<this>;
|
|
44
45
|
getDriverInfo({ force }?: {
|
|
45
46
|
force?: boolean;
|