@applitools/screenshoter
Advanced tools
Comparing version 3.4.5 to 3.4.6
{ | ||
"name": "@applitools/screenshoter", | ||
"version": "3.4.5", | ||
"version": "3.4.6", | ||
"description": "Applitools universal screenshoter for web and native applications", | ||
@@ -81,5 +81,5 @@ "keywords": [ | ||
"@applitools/bongo": "^2.1.5", | ||
"@applitools/driver": "^1.9.7", | ||
"@applitools/driver": "^1.9.9", | ||
"@applitools/scripts": "1.1.0", | ||
"@applitools/spec-driver-webdriverio": "1.2.13", | ||
"@applitools/spec-driver-webdriverio": "1.2.14", | ||
"@applitools/test-utils": "1.3.3", | ||
@@ -86,0 +86,0 @@ "appium": "^1.22.3", |
@@ -60,3 +60,3 @@ const utils = require('@applitools/utils') | ||
image.crop(withStatusBar ? utils.geometry.offset(cropRegion, {x: 0, y: driver.statusBarHeight}) : cropRegion) | ||
image.crop(withStatusBar ? utils.geometry.offset(cropRegion, {x: 0, y: driver.statusBarSize}) : cropRegion) | ||
await image.debug({...debug, name: 'initial', suffix: 'region'}) | ||
@@ -155,3 +155,3 @@ | ||
lastImage, | ||
withStatusBar ? utils.geometry.offset(cropRegion, {x: 0, y: driver.statusBarHeight}) : cropRegion, | ||
withStatusBar ? utils.geometry.offset(cropRegion, {x: 0, y: driver.statusBarSize}) : cropRegion, | ||
) | ||
@@ -158,0 +158,0 @@ await stitchedImage.debug({...debug, name: 'framed'}) |
@@ -102,3 +102,3 @@ const utils = require('@applitools/utils') | ||
if (stabilization.rotate) image.rotate(stabilization.rotate) | ||
else if (driver.orientation === 'landscape' && image.width < image.height) image.rotate(-90) | ||
else if (driver.orientation.startsWith('landscape') && image.width < image.height) image.rotate(-90) | ||
@@ -130,3 +130,3 @@ if (stabilization.crop) image.crop(stabilization.crop) | ||
if (stabilization.rotate) image.rotate(stabilization.rotate) | ||
else if (driver.orientation === 'landscape' && image.width < image.height) image.rotate(-90) | ||
else if (driver.orientation.startsWith('landscape') && image.width < image.height) image.rotate(-90) | ||
@@ -161,22 +161,20 @@ await image.debug({...debug, name: 'marker'}) | ||
if (stabilization.rotate) image.rotate(stabilization.rotate) | ||
else if (driver.orientation === 'landscape' && image.width < image.height) image.rotate(-90) | ||
else if (driver.orientation.startsWith('landscape') && image.width < image.height) image.rotate(-90) | ||
if (stabilization.crop) image.crop(stabilization.crop) | ||
else { | ||
const viewportSize = await driver.getViewportSize() | ||
const viewportRegion = await driver.getViewportRegion() | ||
const cropRegion = {...viewportRegion} | ||
if (withStatusBar) { | ||
image.crop({x: 0, y: 0, width: viewportSize.width, height: viewportSize.height + driver.statusBarHeight}) | ||
} else if (driver.isAndroid && driver.orientation === 'landscape') { | ||
image.crop({ | ||
top: driver.statusBarHeight, | ||
bottom: driver.orientation === 'landscape' ? 0 : driver.navigationBarHeight, | ||
left: driver.platformVersion >= 8 ? driver.navigationBarHeight : 0, | ||
right: driver.platformVersion < 8 ? driver.navigationBarHeight : 0, | ||
}) | ||
} else { | ||
image.crop({x: 0, y: driver.statusBarHeight, width: viewportSize.width, height: viewportSize.height}) | ||
cropRegion.y = 0 | ||
cropRegion.height += driver.statusBarSize | ||
} | ||
image.crop(cropRegion) | ||
} | ||
await image.debug({...debug, name, suffix: `viewport${withStatusBar ? '-with-statusbar' : ''}`}) | ||
await image.debug({ | ||
...debug, | ||
name, | ||
suffix: `viewport${withStatusBar ? '-with-statusbar' : ''}`, | ||
}) | ||
@@ -183,0 +181,0 @@ return image |
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
71556
1289