Skip to content

feat: implement ignore for web#1126

Merged
wswebcreation merged 45 commits intomainfrom
ws/feature-857-implement-web-ignore
Mar 15, 2026
Merged

feat: implement ignore for web#1126
wswebcreation merged 45 commits intomainfrom
ws/feature-857-implement-web-ignore

Conversation

@wswebcreation
Copy link
Member

@wswebcreation wswebcreation commented Feb 26, 2026

This PR implements the ignore option for web, see also #857 . The difference between ignore, hide and remove is that ignore will completely ignore the element and puts an overlay when a diff is created. This PR will consist out of multiple steps that will be explained below:

  • screenshot:
    • Desktop:
      • Chrome
      • FireFox
      • Edge
      • Safari
    • Android: sometimes get a stale element exception on Pixel 9 with Android 14, needs investigation, enhanced fix, from iOS, for all platforms
    • iOS: iOS Safari aggressively invalidates its element reference cache when the DOM is mutated. The CSS injection and DOM manipulation done by beforeScreenshot causes Safari to evict all cached element references. Need to fix this for iOS specifically
  • elementScreenshot
  • fullpageScreenshot
    • Desktop:
      • Chrome
      • FireFox
      • Edge
      • Safari
    • Android: some now fail due to the screenshots adjustments. Need to validate if this also happens on main
    • iOS

We also implemented skip rules in the tests for mobile to track which tests might have issues that needs to be fixed or which logic might be broken which needs to be fixed but not mandatory for the next release

@changeset-bot
Copy link

changeset-bot bot commented Feb 26, 2026

🦋 Changeset detected

Latest commit: 31246b6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@wdio/image-comparison-core Minor
@wdio/visual-service Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Keeping the bidi to viewport resulted in issues with elements that were not in the view. This fixes it
…nshots on desktop

- Add `ignoreRegionPadding` to element/screen check & save flows and apply it in web element/screen ignore region calculations
- Wire `ignoreRegionPadding` through visual-service matchers and update related unit tests/snapshots and desktop/BiDi specs
…shot scale

- Output ignore regions in CSS pixel coordinates in `determineWebElementIgnoreRegions` when `isAndroidNativeWebScreenshot` and `isWebDriverElementScreenshot` are both true (native driver image is at CSS size)
- Pass `isAndroidNativeWebScreenshot` and `isWebDriverElementScreenshot` from `saveWebElement` into `determineWebElementIgnoreRegions`
- Add unit test for the Android native web + native driver downscale path
- there's a bug in the driver, it will only create a screenshot of the the visual part, but will keep the dimensions of the original element
- add iignoreRegionPadding for fullpage and make it generic
- Revert injectWebviewOverlay.ts to use Math.round() for viewport data
  collection, fixing ~0.2% fullpage stitching mismatches on Android
- Revert getMobileViewPortPosition to main's calculation logic, removing
  Math.min clamping that caused viewport dimension inconsistencies
- Fix scrollElementIntoView to account for current scroll position when
  computing target scroll offset (BCR.top is viewport-relative, not
  document-absolute), preventing blank iOS element screenshots
- Update unit tests and regenerate affected Android fullpage baselines

Made-with: Cursor
the caps didn't always work. Now we have this fixed in a more elegant way which is handled by the module
- update images
- add more tests
@wswebcreation wswebcreation marked this pull request as ready for review March 13, 2026 07:34
- fix pipeline
- fix native app rectangles
…brid status bar fallback

 - Use the device's platform version to select the correct offsets entry for the hybrid-app status bar
@wswebcreation wswebcreation merged commit 994f4da into main Mar 15, 2026
21 of 22 checks passed
@wswebcreation wswebcreation deleted the ws/feature-857-implement-web-ignore branch March 15, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant