Skip to content

Commit 7e6324d

Browse files
committed
chore: add changeset
1 parent 598ea05 commit 7e6324d

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@wdio/image-comparison-core': minor
3+
'@wdio/visual-service': minor
4+
---
5+
6+
## #857 Support ignore regions for web screenshots
7+
8+
Add `ignore` support to all web screenshot methods (`saveScreen`/`checkScreen`, `saveElement`/`checkElement`, `saveFullPageScreen`/`checkFullPageScreen`) so that specified elements can be blocked out during visual comparison. This brings web parity with the native-app ignore-region support that already existed.
9+
10+
### Changes
11+
12+
- **Ignore regions for full-page screenshots** — new `determineWebFullPageIgnoreRegions` function that calculates ignore-region rectangles for full-page screenshots, including a `fullPageCropTopPaddingCSS` correction for mobile scroll-and-stitch scenarios where the address-bar shadow padding shifts element positions
13+
- **Consolidated `ignoreRegionPadding`** — moved `ignoreRegionPadding` into `BaseWebScreenshotOptions` so it is inherited by all web methods instead of being duplicated per method
14+
- **Fix `isAndroidNativeWebScreenshot` type** — ensure `nativeWebScreenshot` is always a boolean (was accidentally an object for LambdaTest capabilities), preventing ignore-region DPR scaling failures
15+
- **Fix viewport rounding for mobile** — restore `Math.round()` in `injectWebviewOverlay` and remove `Math.min` clamping in `getMobileViewPortPosition` to prevent 1-pixel crop shifts during full-page stitching
16+
- **Fix `scrollElementIntoView` for scrolled pages** — account for `currentPosition` (existing scroll offset) when computing the target scroll position, so elements are scrolled into view correctly when the page is already scrolled
17+
- **Dismiss Chrome Start Surface on Android** — when Chrome's tab-overview UI blocks the webview overlay, automatically press the Android Back button (up to 4 retries) to restore the active tab before measuring the viewport
18+
19+
# Committers: 1
20+
21+
- Wim Selles ([@wswebcreation](https://github.com/wswebcreation))

0 commit comments

Comments
 (0)