Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@applitools/screenshoter

Package Overview
Dependencies
Maintainers
30
Versions
173
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/screenshoter - npm Package Compare versions

Comparing version 3.4.5 to 3.4.6

6

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc