@applitools/screenshoter
Advanced tools
Comparing version 3.8.13 to 3.8.14
# Changelog | ||
## [3.8.14](https://github.com/applitools/eyes.sdk.javascript1/compare/js/screenshoter@3.8.13...js/screenshoter@3.8.14) (2023-10-17) | ||
### Bug Fixes | ||
* allow css scrolling when taking screenshot of the webview ([2d3a257](https://github.com/applitools/eyes.sdk.javascript1/commit/2d3a2572768e7f979d16297ca316a79ab2538adb)) | ||
### Code Refactoring | ||
* disallow usage of global Buffer ([#1957](https://github.com/applitools/eyes.sdk.javascript1/issues/1957)) ([adcc082](https://github.com/applitools/eyes.sdk.javascript1/commit/adcc082f20f6b92e819b96424e995d9a69d99758)) | ||
### Dependencies | ||
* @applitools/utils bumped to 1.6.2 | ||
#### Code Refactoring | ||
* disallow usage of global Buffer ([#1957](https://github.com/applitools/eyes.sdk.javascript1/issues/1957)) ([adcc082](https://github.com/applitools/eyes.sdk.javascript1/commit/adcc082f20f6b92e819b96424e995d9a69d99758)) | ||
* @applitools/logger bumped to 2.0.12 | ||
#### Code Refactoring | ||
* disallow usage of global Buffer ([#1957](https://github.com/applitools/eyes.sdk.javascript1/issues/1957)) ([adcc082](https://github.com/applitools/eyes.sdk.javascript1/commit/adcc082f20f6b92e819b96424e995d9a69d99758)) | ||
* @applitools/image bumped to 1.1.7 | ||
#### Bug Fixes | ||
* avoid using ascii text decoder ([1b68d39](https://github.com/applitools/eyes.sdk.javascript1/commit/1b68d3945d96b17b9ab1f1a87d352206fd0c81d6)) | ||
#### Code Refactoring | ||
* disallow usage of global Buffer ([#1957](https://github.com/applitools/eyes.sdk.javascript1/issues/1957)) ([adcc082](https://github.com/applitools/eyes.sdk.javascript1/commit/adcc082f20f6b92e819b96424e995d9a69d99758)) | ||
* @applitools/spec-driver-webdriver bumped to 1.0.48 | ||
* @applitools/driver bumped to 1.14.4 | ||
#### Code Refactoring | ||
* disallow usage of global Buffer ([#1957](https://github.com/applitools/eyes.sdk.javascript1/issues/1957)) ([adcc082](https://github.com/applitools/eyes.sdk.javascript1/commit/adcc082f20f6b92e819b96424e995d9a69d99758)) | ||
## [3.8.13](https://github.com/applitools/eyes.sdk.javascript1/compare/js/screenshoter@3.8.12...js/screenshoter@3.8.13) (2023-09-29) | ||
@@ -4,0 +52,0 @@ |
{ | ||
"name": "@applitools/screenshoter", | ||
"version": "3.8.13", | ||
"version": "3.8.14", | ||
"description": "Applitools universal screenshoter for web and native applications", | ||
@@ -59,10 +59,10 @@ "keywords": [ | ||
"dependencies": { | ||
"@applitools/image": "1.1.6", | ||
"@applitools/logger": "2.0.11", | ||
"@applitools/image": "1.1.7", | ||
"@applitools/logger": "2.0.12", | ||
"@applitools/snippets": "2.4.24", | ||
"@applitools/utils": "1.6.1" | ||
"@applitools/utils": "1.6.2" | ||
}, | ||
"devDependencies": { | ||
"@applitools/driver": "^1.14.3", | ||
"@applitools/spec-driver-webdriver": "^1.0.47", | ||
"@applitools/driver": "^1.14.4", | ||
"@applitools/spec-driver-webdriver": "^1.0.48", | ||
"@applitools/test-utils": "^1.5.17", | ||
@@ -69,0 +69,0 @@ "appium": "^1.22.3", |
@@ -36,7 +36,8 @@ const {makeLogger} = require('@applitools/logger') | ||
const environment = await driver.getEnvironment() | ||
const originalEnvironment = await driver.getEnvironment() | ||
// switch worlds as needed | ||
// world should be switched to webview if webview screenshot or the window screenshot is requested | ||
// in case of window screenshot we will be switching to native app view | ||
let activeWorld | ||
if (environment.isNative && (webview || (window && environment.isWeb))) { | ||
if (originalEnvironment.isNative && (webview || (window && originalEnvironment.isWeb))) { | ||
if (webview === true) { | ||
@@ -47,5 +48,8 @@ const worlds = await driver.getWorlds() | ||
activeWorld = await driver.getCurrentWorld() | ||
await driver.switchWorld(webview) | ||
if (activeWorld !== webview) await driver.switchWorld(webview) | ||
else activeWorld = undefined | ||
} | ||
const environment = await driver.getEnvironment() | ||
// framed screenshots could be taken only when screenshot of window/app fully was requested | ||
@@ -55,3 +59,3 @@ framed = framed && fully && window | ||
withStatusBar = withStatusBar && environment.isNative && window && (!fully || framed) | ||
scrollingMode = environment.isNative ? 'scroll' : scrollingMode | ||
scrollingMode = !environment.isWeb ? 'scroll' : scrollingMode | ||
@@ -71,3 +75,3 @@ const activeContext = driver.currentContext | ||
// this is unwanted but necessary side effect, because it is not possible to extract initial scroll position | ||
if (environment.isNative && !window) await scrollingElement.scrollTo({x: 0, y: 0}, {force: true}) | ||
if (!environment.isWeb && !window) await scrollingElement.scrollTo({x: 0, y: 0}, {force: true}) | ||
await scrollingElement.preserveState() | ||
@@ -87,3 +91,3 @@ } | ||
if (!window && !environment.isNative) await scrollIntoViewport({...target, logger}) | ||
if (!window && environment.isWeb) await scrollIntoViewport({...target, logger}) | ||
@@ -90,0 +94,0 @@ if (fully && !target.region && target.scroller) await target.scroller.moveTo({x: 0, y: 0}) |
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
67505
794
+ Added@applitools/image@1.1.7(transitive)
+ Added@applitools/logger@2.0.12(transitive)
+ Added@applitools/utils@1.6.2(transitive)
- Removed@applitools/image@1.1.6(transitive)
- Removed@applitools/logger@2.0.11(transitive)
- Removed@applitools/utils@1.6.1(transitive)
Updated@applitools/image@1.1.7
Updated@applitools/logger@2.0.12
Updated@applitools/utils@1.6.2