@applitools/screenshoter 3.9.5 → 3.10.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,45 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.10.1](https://github.com/Applitools-Dev/sdk/compare/js/screenshoter@3.10.0...js/screenshoter@3.10.1) (2024-12-18)
4
+
5
+
6
+ ### Dependencies
7
+
8
+ * @applitools/utils bumped to 1.7.6
9
+ #### Bug Fixes
10
+
11
+ * support webdriver.io 9 ([baee5ce](https://github.com/Applitools-Dev/sdk/commit/baee5ce96e8220c337b007e3a517b5546ce0fedc))
12
+ * @applitools/spec-driver-webdriver bumped to 1.1.21
13
+ #### Bug Fixes
14
+
15
+ * support webdriver.io 9 ([baee5ce](https://github.com/Applitools-Dev/sdk/commit/baee5ce96e8220c337b007e3a517b5546ce0fedc))
16
+
17
+
18
+
19
+ * @applitools/logger bumped to 2.0.20
20
+
21
+ * @applitools/image bumped to 1.1.15
22
+
23
+ * @applitools/driver bumped to 1.20.1
24
+
25
+
26
+ ## [3.10.0](https://github.com/Applitools-Dev/sdk/compare/js/screenshoter@3.9.5...js/screenshoter@3.10.0) (2024-11-12)
27
+
28
+
29
+ ### Features
30
+
31
+ * add an option to keep the navigation bar for android devices ([#2608](https://github.com/Applitools-Dev/sdk/issues/2608)) ([e7647e0](https://github.com/Applitools-Dev/sdk/commit/e7647e0105a7aa47e6bf3b20ab033f1e389ca849))
32
+
33
+
34
+ ### Dependencies
35
+
36
+ * @applitools/driver bumped to 1.20.0
37
+ #### Features
38
+
39
+ * add an option to keep the navigation bar for android devices ([#2608](https://github.com/Applitools-Dev/sdk/issues/2608)) ([e7647e0](https://github.com/Applitools-Dev/sdk/commit/e7647e0105a7aa47e6bf3b20ab033f1e389ca849))
40
+ * @applitools/spec-driver-webdriver bumped to 1.1.20
41
+
42
+
3
43
  ## [3.9.5](https://github.com/Applitools-Dev/sdk/compare/js/screenshoter@3.9.4...js/screenshoter@3.9.5) (2024-11-07)
4
44
 
5
45
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/screenshoter",
3
- "version": "3.9.5",
3
+ "version": "3.10.1",
4
4
  "description": "Applitools universal screenshoter for web and native applications",
5
5
  "keywords": [
6
6
  "applitools",
@@ -56,14 +56,14 @@
56
56
  "appium:setup": "mkdir -p ./logs && appium --address 127.0.0.1 --port 4723 --base-path /wd/hub --log-level error:info --log ./logs/appium.log --relaxed-security &"
57
57
  },
58
58
  "dependencies": {
59
- "@applitools/image": "1.1.14",
60
- "@applitools/logger": "2.0.19",
61
- "@applitools/snippets": "2.6.2",
62
- "@applitools/utils": "1.7.5"
59
+ "@applitools/image": "1.1.15",
60
+ "@applitools/logger": "2.0.20",
61
+ "@applitools/snippets": "2.6.3",
62
+ "@applitools/utils": "1.7.6"
63
63
  },
64
64
  "devDependencies": {
65
- "@applitools/driver": "^1.19.7",
66
- "@applitools/spec-driver-webdriver": "^1.1.19",
65
+ "@applitools/driver": "^1.20.1",
66
+ "@applitools/spec-driver-webdriver": "^1.1.21",
67
67
  "@applitools/test-utils": "^1.5.17",
68
68
  "appium": "^1.22.3",
69
69
  "pixelmatch": "^5.3.0",
@@ -15,6 +15,7 @@ async function takeScreenshot({
15
15
  hideScrollbars,
16
16
  hideCaret,
17
17
  captureStatusBar,
18
+ keepNavigationBar,
18
19
  overlap,
19
20
  framed,
20
21
  wait,
@@ -101,7 +102,7 @@ async function takeScreenshot({
101
102
  logger,
102
103
  lazyLoad,
103
104
  })
104
- : await takeSimpleScreenshot({...target, captureStatusBar, wait, stabilization, debug, logger})
105
+ : await takeSimpleScreenshot({...target, captureStatusBar, keepNavigationBar, wait, stabilization, debug, logger})
105
106
 
106
107
  const viewport = await driver.getViewport()
107
108
 
@@ -1,7 +1,16 @@
1
1
  const utils = require('@applitools/utils')
2
2
  const makeTakeViewportScreenshot = require('./take-viewport-screenshot')
3
3
 
4
- async function takeSimpleScreenshot({context, region, captureStatusBar, wait, stabilization, debug = {}, logger}) {
4
+ async function takeSimpleScreenshot({
5
+ context,
6
+ region,
7
+ captureStatusBar,
8
+ keepNavigationBar,
9
+ wait,
10
+ stabilization,
11
+ debug = {},
12
+ logger,
13
+ }) {
5
14
  logger.verbose('Taking image of...')
6
15
 
7
16
  const driver = context.driver
@@ -9,7 +18,7 @@ async function takeSimpleScreenshot({context, region, captureStatusBar, wait, st
9
18
 
10
19
  await utils.general.sleep(wait)
11
20
 
12
- const image = await takeViewportScreenshot({captureStatusBar})
21
+ const image = await takeViewportScreenshot({captureStatusBar, keepNavigationBar})
13
22
 
14
23
  if (region) {
15
24
  const cropRegion = await driver.getRegionInViewport(context, region)
@@ -150,9 +150,9 @@ function makeTakeMarkedScreenshot({driver, stabilization = {}, debug, logger}) {
150
150
  }
151
151
 
152
152
  function makeTakeNativeScreenshot({driver, stabilization = {}, debug, logger}) {
153
- return async function takeScreenshot({name, captureStatusBar} = {}) {
153
+ return async function takeScreenshot({name, captureStatusBar, keepNavigationBar} = {}) {
154
154
  logger.verbose('Taking native driver screenshot...')
155
- const viewport = await driver.getViewport()
155
+ const viewport = await driver.getViewport({keepNavigationBar})
156
156
  const image = makeImage(await driver.takeScreenshot())
157
157
  await image.debug({...debug, name, suffix: 'original'})
158
158