@applitools/driver 1.15.2 → 1.15.3

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,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.15.3](https://github.com/applitools/eyes.sdk.javascript1/compare/js/driver@1.15.2...js/driver@1.15.3) (2023-12-12)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * layout breakpoints reload and lazy load ([#2073](https://github.com/applitools/eyes.sdk.javascript1/issues/2073)) ([ab2c49e](https://github.com/applitools/eyes.sdk.javascript1/commit/ab2c49ea1ecff3fef337637a83aa5bef755a7b01))
9
+
3
10
  ## [1.15.2](https://github.com/applitools/eyes.sdk.javascript1/compare/js/driver@1.15.1...js/driver@1.15.2) (2023-12-05)
4
11
 
5
12
 
package/dist/context.js CHANGED
@@ -394,24 +394,26 @@ class Context {
394
394
  async getScrollingElement() {
395
395
  if (!(0, element_1.isElementInstance)(this._scrollingElement)) {
396
396
  await this.focus();
397
- const environment = await this.driver.getEnvironment();
398
397
  if (this._scrollingElement) {
399
398
  this._scrollingElement = await this.element(this._scrollingElement);
400
399
  }
401
- else if (environment.isWeb) {
402
- let selector;
403
- if (environment.isIOS && !environment.isEmulation) {
404
- selector = 'html';
405
- this.logger.log(`Using hardcoded default scrolling element for Safari on iOS - "${selector}"`);
400
+ else {
401
+ const environment = await this.driver.getEnvironment();
402
+ if (environment.isWeb) {
403
+ let selector;
404
+ if (environment.isIOS && !environment.isEmulation) {
405
+ selector = 'html';
406
+ this.logger.log(`Using hardcoded default scrolling element for Safari on iOS - "${selector}"`);
407
+ }
408
+ else {
409
+ selector = await this.execute(snippets.getDocumentScrollingElement);
410
+ this.logger.log(`Using dynamic default scrolling element - "${selector}"`);
411
+ }
412
+ this._scrollingElement = await this.element({ type: 'css', selector });
406
413
  }
407
414
  else {
408
- selector = await this.execute(snippets.getDocumentScrollingElement);
409
- this.logger.log(`Using dynamic default scrolling element - "${selector}"`);
415
+ this._scrollingElement = await this.element({ type: 'xpath', selector: '//*[@scrollable="true"]' });
410
416
  }
411
- this._scrollingElement = await this.element({ type: 'css', selector });
412
- }
413
- else {
414
- this._scrollingElement = await this.element({ type: 'xpath', selector: '//*[@scrollable="true"]' });
415
417
  }
416
418
  }
417
419
  return this._scrollingElement;
package/dist/driver.js CHANGED
@@ -78,7 +78,10 @@ class Driver {
78
78
  }
79
79
  async reloadPage() {
80
80
  await this.mainContext.execute(snippets.reloadPage).catch(() => null);
81
- return this.refresh({ reset: false });
81
+ const refreshThis = await this.refresh({ reset: false });
82
+ const scrollingElement = await this.mainContext.getScrollingElement();
83
+ await (scrollingElement === null || scrollingElement === void 0 ? void 0 : scrollingElement.refresh());
84
+ return refreshThis;
82
85
  }
83
86
  async refresh({ reset } = {}) {
84
87
  if (reset) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/driver",
3
- "version": "1.15.2",
3
+ "version": "1.15.3",
4
4
  "description": "Applitools universal framework wrapper",
5
5
  "keywords": [
6
6
  "applitools",