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

@applitools/screenshoter

Package Overview
Dependencies
Maintainers
33
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.5.5 to 3.6.0

8

package.json
{
"name": "@applitools/screenshoter",
"version": "3.5.5",
"version": "3.6.0",
"description": "Applitools universal screenshoter for web and native applications",

@@ -76,3 +76,3 @@ "keywords": [

"@applitools/image": "1.0.2",
"@applitools/logger": "1.1.23",
"@applitools/logger": "1.1.24",
"@applitools/snippets": "2.4.5",

@@ -85,5 +85,5 @@ "@applitools/utils": "1.3.12",

"@applitools/bongo": "^2.2.0",
"@applitools/driver": "^1.9.34",
"@applitools/driver": "^1.10.3",
"@applitools/scripts": "^1.1.0",
"@applitools/spec-driver-webdriverio": "^1.2.25",
"@applitools/spec-driver-webdriverio": "^1.3.0",
"@applitools/test-utils": "^1.5.1",

@@ -90,0 +90,0 @@ "appium": "^1.22.3",

@@ -26,2 +26,3 @@ const {makeLogger} = require('@applitools/logger')

lazyLoad,
webview,
}) {

@@ -32,4 +33,10 @@ debug =

logger = logger ? logger.extend({label: 'screenshoter'}) : makeLogger({label: 'screenshoter'})
// screenshot of a window/app was requested (fully or viewport)
const window = !region && (!frames || frames.length === 0)
// switch worlds as needed
if (webview && driver.isNative) await driver.switchWorld(typeof webview === 'string' ? {id: webview} : null)
if (window && !webview && driver.isWebView) await driver.switchWorld({goHome: true})
// framed screenshots could be taken only when screenshot of window/app fully was requested

@@ -120,2 +127,5 @@ framed = framed && fully && window

await activeContext.focus()
// return driver to previous app world if switched
await driver.switchWorld({restoreState: true})
},

@@ -122,0 +132,0 @@ }

@@ -10,3 +10,3 @@ const utils = require('@applitools/utils')

return makeTakeNativeScreenshot(options)
} else if (driver.isIOS) {
} else if (driver.isIOS || driver.isWebView) {
// safari on ios takes screenshot with browser and os interfaces

@@ -13,0 +13,0 @@ return makeTakeMarkedScreenshot(options)

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