@applitools/driver
Advanced tools
Comparing version 1.4.3 to 1.4.4
@@ -6,2 +6,7 @@ # Change Log | ||
## 1.4.4 - 2021/12/20 | ||
- improve native android app scrolling performance | ||
- fix bug with `Buffer.from` and base64 | ||
## 1.4.3 - 2021/12/17 | ||
@@ -8,0 +13,0 @@ |
@@ -395,3 +395,3 @@ "use strict"; | ||
if (utils.types.isString(image)) { | ||
return Buffer.from(image.replace(/[\r\n]+/g, '')); | ||
return Buffer.from(image.replace(/[\r\n]+/g, ''), 'base64'); | ||
} | ||
@@ -398,0 +398,0 @@ return image; |
@@ -292,2 +292,3 @@ "use strict"; | ||
} | ||
const actions = []; | ||
const touchPadding = await this.getTouchPadding(); | ||
@@ -303,3 +304,3 @@ const xPadding = Math.max(Math.floor(effectiveRegion.width * 0.1), touchPadding); | ||
const [xStart, xEnd] = xDirection === 'right' ? [xRight, xLeft] : [xLeft, xRight]; | ||
await this._spec.performAction(this.driver.target, [ | ||
actions.push([ | ||
{ action: 'press', y: yTrack, x: xStart }, | ||
@@ -325,3 +326,3 @@ { action: 'wait', ms: 100 }, | ||
const [yStart, yEnd] = yDirection === 'down' ? [yBottom, yTop] : [yTop, yBottom]; | ||
await this._spec.performAction(this.driver.target, [ | ||
actions.push([ | ||
{ action: 'press', x: xTrack, y: yStart }, | ||
@@ -338,2 +339,11 @@ { action: 'wait', ms: 100 }, | ||
} | ||
// ios actions should be executed one-by-one sequentially, otherwise the result isn't stable | ||
if (this.driver.isIOS) { | ||
for (const action of actions) { | ||
await this._spec.performAction(this.driver.target, action); | ||
} | ||
} | ||
else { | ||
await this._spec.performAction(this.driver.target, [].concat(...actions)); | ||
} | ||
const actualScrollableRegion = await this.getClientRegion(); | ||
@@ -340,0 +350,0 @@ this._state.scrollOffset = utils.geometry.offsetNegative(requiredOffset, { |
{ | ||
"name": "@applitools/driver", | ||
"version": "1.4.3", | ||
"version": "1.4.4", | ||
"description": "Applitools universal framework wrapper", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
153675
2826