@applitools/driver 1.24.3 → 1.25.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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.25.0](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.24.4...js/driver@1.25.0) (2026-01-19)
4
+
5
+
6
+ ### Features
7
+
8
+ * multi-page support - FLD-3827 ([#3410](https://github.com/Applitools-Dev/sdk/issues/3410)) ([a55b982](https://github.com/Applitools-Dev/sdk/commit/a55b9827c2218c11da5ed61b38bf12a70ce4c8db))
9
+
10
+ ## [1.24.4](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.24.3...js/driver@1.24.4) (2026-01-11)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * scrolling element fallback logic | FLD-3959 ([#3442](https://github.com/Applitools-Dev/sdk/issues/3442)) ([36348b4](https://github.com/Applitools-Dev/sdk/commit/36348b46e6a127c99d4ccfa58bf386a8e414fb40))
16
+
3
17
  ## [1.24.3](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.24.2...js/driver@1.24.3) (2025-12-01)
4
18
 
5
19
 
package/dist/context.js CHANGED
@@ -433,6 +433,10 @@ class Context {
433
433
  this.logger.log(`Using dynamic default scrolling element - "${selector}"`);
434
434
  }
435
435
  this._scrollingElement = await this.element({ type: 'css', selector });
436
+ if (!this._scrollingElement) {
437
+ this.logger.warn(`Scrolling element "${selector}" not found, trying with xpath selector`);
438
+ this._scrollingElement = await this.element({ type: 'xpath', selector: `//${selector}` });
439
+ }
436
440
  }
437
441
  else {
438
442
  this._scrollingElement = await this.element({ type: 'xpath', selector: '//*[@scrollable="true"]' });
package/dist/driver.js CHANGED
@@ -691,6 +691,16 @@ class Driver {
691
691
  }
692
692
  return normalizedRegion;
693
693
  }
694
+ async bringToFront() {
695
+ var _a, _b;
696
+ try {
697
+ // This is awaited here and not in spec to handle errors in a single place
698
+ await ((_b = (_a = this._spec).bringToFront) === null || _b === void 0 ? void 0 : _b.call(_a, this.target));
699
+ }
700
+ catch (error) {
701
+ this._logger.warn('Unable to bringToFront the current context due to the error', error);
702
+ }
703
+ }
694
704
  async getRegionInViewport(context, region) {
695
705
  await context.focus();
696
706
  return context.getRegionInViewport(region);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/driver",
3
- "version": "1.24.3",
3
+ "version": "1.25.0",
4
4
  "description": "Applitools universal framework wrapper",
5
5
  "keywords": [
6
6
  "applitools",
package/types/driver.d.ts CHANGED
@@ -88,6 +88,7 @@ export declare class Driver<T extends SpecType> {
88
88
  switchToParentContext(elevation?: number): Promise<Context<T>>;
89
89
  switchToChildContext(...references: ContextReference<T>[]): Promise<Context<T>>;
90
90
  normalizeRegion(region: Region): Promise<Region>;
91
+ bringToFront(): Promise<void>;
91
92
  getRegionInViewport(context: Context<T>, region: Region): Promise<Region>;
92
93
  takeScreenshot(): Promise<Uint8Array>;
93
94
  getViewportSize(): Promise<Size>;
@@ -142,6 +142,7 @@ export interface SpecDriver<T extends SpecType> {
142
142
  getWorlds?(driver: T['driver']): Promise<string[]>;
143
143
  switchWorld?(driver: T['driver'], id: string): Promise<void>;
144
144
  reload?(driver: T['driver']): Promise<void>;
145
+ bringToFront?(driver: T['driver']): Promise<void>;
145
146
  }
146
147
  export type WaitOptions = {
147
148
  state?: 'exist' | 'visible';