@applitools/screenshoter
Advanced tools
Comparing version 3.5.5 to 3.6.0
{ | ||
"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) |
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
52236
757
+ Added@applitools/logger@1.1.24(transitive)
+ Added@applitools/types@1.5.17(transitive)
- Removed@applitools/logger@1.1.23(transitive)
- Removed@applitools/types@1.5.16(transitive)
Updated@applitools/logger@1.1.24