@applitools/driver 1.9.0 → 1.9.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.
Files changed (2) hide show
  1. package/dist/element.js +7 -3
  2. package/package.json +1 -1
package/dist/element.js CHANGED
@@ -110,7 +110,9 @@ class Element {
110
110
  x: contentSize.left,
111
111
  y: contentSize.top,
112
112
  width: contentSize.width,
113
- height: (this.driver.isAndroid ? contentSize.height : 0) + contentSize.scrollableOffset,
113
+ height: this.driver.isIOS
114
+ ? Math.max(contentSize.height, contentSize.scrollableOffset)
115
+ : contentSize.height + contentSize.scrollableOffset,
114
116
  };
115
117
  })
116
118
  .catch(() => this._spec.getElementRegion(this.driver.target, this.target));
@@ -197,7 +199,9 @@ class Element {
197
199
  x: contentSize.left,
198
200
  y: contentSize.top,
199
201
  width: contentSize.width,
200
- height: (this.driver.isAndroid ? contentSize.height : 0) + contentSize.scrollableOffset,
202
+ height: this.driver.isIOS
203
+ ? Math.max(contentSize.height, contentSize.scrollableOffset)
204
+ : contentSize.height + contentSize.scrollableOffset,
201
205
  };
202
206
  })
203
207
  .catch(err => {
@@ -281,7 +285,7 @@ class Element {
281
285
  this._state.touchPadding = 10;
282
286
  else if (this.driver.isAndroid) {
283
287
  const touchPadding = await this.getAttribute('contentSize')
284
- .then(value => JSON.parse(value).touchPadding)
288
+ .then(data => JSON.parse(data).touchPadding)
285
289
  .catch(err => {
286
290
  this._logger.warn(`Unable to get the attribute 'contentSize' when looking up 'touchPadding' due to the following error: '${err.message}'`);
287
291
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/driver",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "Applitools universal framework wrapper",
5
5
  "keywords": [
6
6
  "applitools",