@applitools/driver 1.5.0 → 1.5.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 CHANGED
@@ -3,6 +3,10 @@
3
3
  ## Unreleased
4
4
 
5
5
 
6
+ ## 1.5.1 - 2022/3/7
7
+
8
+ - fix `getScrollingElement` in mobile native
9
+
6
10
  ## 1.5.0 - 2022/3/6
7
11
 
8
12
  - add `waitForSelector` method
package/dist/context.js CHANGED
@@ -352,10 +352,13 @@ class Context {
352
352
  if (this._scrollingElement) {
353
353
  this._scrollingElement = await this.element(this._scrollingElement);
354
354
  }
355
- else {
355
+ else if (this.driver.isWeb) {
356
356
  const selector = await this.execute(snippets.getDocumentScrollingElement);
357
357
  this._logger.log(`default SRE is ${selector}`);
358
- this._scrollingElement = await this.element(this.driver.isWeb ? { type: 'css', selector } : { type: 'xpath', selector: '//*[@scrollable="true"]' });
358
+ this._scrollingElement = await this.element({ type: 'css', selector });
359
+ }
360
+ else {
361
+ this._scrollingElement = await this.element({ type: 'xpath', selector: '//*[@scrollable="true"]' });
359
362
  }
360
363
  }
361
364
  return this._scrollingElement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/driver",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Applitools universal framework wrapper",
5
5
  "keywords": [
6
6
  "applitools",