@applitools/screenshoter 3.3.20 → 3.3.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/get-target.js +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/screenshoter",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.21",
|
|
4
4
|
"description": "Applitools universal screenshoter for web and native applications",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"applitools",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@applitools/bongo": "^2.0.3",
|
|
70
|
-
"@applitools/driver": "^1.8.
|
|
70
|
+
"@applitools/driver": "^1.8.11",
|
|
71
71
|
"@applitools/scripts": "1.1.0",
|
|
72
72
|
"@applitools/spec-driver-webdriverio": "1.2.9",
|
|
73
73
|
"@applitools/test-utils": "1.3.2",
|
package/src/get-target.js
CHANGED
|
@@ -31,7 +31,9 @@ async function getTarget({window, context, region, fully, scrollingMode, logger}
|
|
|
31
31
|
if (element.driver.isNative) {
|
|
32
32
|
// if element is in a native context, then scroll it to the top, otherwise, it will be not possible to get all of its size
|
|
33
33
|
const scrollingElement = await elementContext.getScrollingElement()
|
|
34
|
-
if (scrollingElement
|
|
34
|
+
if (scrollingElement && (await scrollingElement.contains(element))) {
|
|
35
|
+
await scrollingElement.scrollTo(await element.getRegion())
|
|
36
|
+
}
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
if (fully) {
|