@applitools/screenshoter 3.3.14 → 3.3.15

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/screenshoter",
3
- "version": "3.3.14",
3
+ "version": "3.3.15",
4
4
  "description": "Applitools universal screenshoter for web and native applications",
5
5
  "keywords": [
6
6
  "applitools",
@@ -65,8 +65,8 @@
65
65
  "png-async": "0.9.4"
66
66
  },
67
67
  "devDependencies": {
68
- "@applitools/bongo": "^2.0.0",
69
- "@applitools/driver": "1.5.7",
68
+ "@applitools/bongo": "^2.0.1",
69
+ "@applitools/driver": "1.6.1",
70
70
  "@applitools/scripts": "1.1.0",
71
71
  "@applitools/spec-driver-webdriverio": "1.2.8",
72
72
  "@applitools/test-utils": "1.3.0",
@@ -163,7 +163,18 @@ function makeTakeNativeScreenshot({driver, stabilization = {}, debug, logger}) {
163
163
  const viewportSize = await driver.getViewportSize()
164
164
  const cropRegion = withStatusBar
165
165
  ? {x: 0, y: 0, width: viewportSize.width, height: viewportSize.height + driver.statusBarHeight}
166
- : {top: driver.statusBarHeight, bottom: driver.navigationBarHeight, left: 0, right: 0}
166
+ : {
167
+ top: driver.statusBarHeight,
168
+ bottom: driver.orientation === 'landscape' ? 0 : driver.navigationBarHeight,
169
+ left:
170
+ driver.isAndroid && driver.orientation === 'landscape' && driver.platformVersion > 7
171
+ ? driver.navigationBarHeight
172
+ : 0,
173
+ right:
174
+ driver.isAndroid && driver.orientation === 'landscape' && driver.platformVersion < 8
175
+ ? driver.navigationBarHeight
176
+ : 0,
177
+ }
167
178
  image.crop(cropRegion)
168
179
  }
169
180