Skip to content

feat: implement ignore for web#1126

Draft
wswebcreation wants to merge 31 commits intomainfrom
ws/feature-857-implement-web-ignore
Draft

feat: implement ignore for web#1126
wswebcreation wants to merge 31 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

⚠️ No Changeset found

Latest commit: 4e084bf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a 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
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