Ws/add bidi screenshot support#831
Merged
wswebcreation merged 4 commits intows/new-major-releasesfrom Apr 14, 2025
Merged
Conversation
🦋 Changeset detectedLatest commit: 2ede803 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
Contributor
There was a problem hiding this comment.
Copilot reviewed 14 out of 16 changed files in this pull request and generated no comments.
Files not reviewed (2)
- packages/webdriver-image-comparison/src/snapshots/base.test.ts.snap: Language not supported
- packages/webdriver-image-comparison/src/helpers/snapshots/options.test.ts.snap: Language not supported
wswebcreation
added a commit
that referenced
this pull request
Apr 18, 2025
* Ws/fix-747-improve-mobile-webview-screenshot (#777) * chore: update deps * chore: revert major eslint * feat: initial setup for device layer calculations - this is work in progress * chore: fixed some stuff and updated some broken UT's * fix: right import and export * fix: fix mocks * chore: optimise code a bit and add docs * chore: fix linking and types * fix: fix return data from overlay * feat: add Android support for blockouts based on device rectangles * feat: support ios and android for checkScreen - simplify determineStatusAddressToolBarRectangles - reduce rectangle tests - fix data url loading in Safari * feat: add checkElement support * fix: optimise code and fix UTs for element * feat: support savefullpagescreenshot with new viewport data for Android * feat: support fullpage for iOS portrait * test: fix tests * fix: multiple fixes for fullpage - iOS had issues on landscape - removed not needed code and files * chore: remove logs * fix: fix Android Appium 1 issues - add fallback - remove logs - update images for android phones * chore: update iOS stuff - add LANDSCAPE for local android * chore: updated safari desktop screenshots * test: update snapshots * feat: move the new logic to the webdriver-image-comparison module * fix: fix unit tests * breaking: taking element screenshot for iOS - some other small fixes * chore: optimise deviceRectangles - remove devicePlatformRect - enrich deviceRectangles with statusBar and homeBar - change devicePlatformRect output to x/y instead of left/top to match a coordinate system - fix UTs * chore: refactor stuff - rename function - add screendata for deviceRectangles * chore: improve readability for vars in utils * chore: update baseline and workflow * chore: last image updates * chore: update latest deps * fix: add fallback for Android and iOS mobile screensize - add more UT's * test: add more UT's * fix: fix orientation and update ios images * Add viewport context manager for managing device rectangles (#833) * feat: add viewport context manager * feat: add new context manager - revert old one - add a wrapper for each command that checks for changes - fix screensizes when the orientation changes and provide better fallback There is a TODO regarding Multiremote on the global browser * chore: fix UT's * chore: add a last test * feat: enhance context manager - add mobile context - add wrapper per command - add and fix UT's * fix: multiple fixes - fix capabilities, should be requested - assumed that the `'mobile: deviceInfo` didn't return landscape info - added new images for android * fix: reset orientation * Fix: fix iOS orientation and make it generic * chore: new iOS images * fix: support proper appium cap present - add new images - add nativeWebScreenshot for proper webviews screenshots * test: add iOS for webview tests - add new images * fix: fix tests * Ws/add bidi screenshot support (#831) * feat: add bidi fullpage screenshot support * chore: code optimizations * chore: add changeset * feat: deprecate root compare options (#832) * feat: deprecate root compare options * chore: add changeset * Update packages/webdriver-image-comparison/src/helpers/options.ts Co-authored-by: alcpereira <48070464+alcpereira@users.noreply.github.com> * Update packages/webdriver-image-comparison/src/helpers/utils.ts Co-authored-by: alcpereira <48070464+alcpereira@users.noreply.github.com> * Update packages/webdriver-image-comparison/src/helpers/utils.ts Co-authored-by: alcpereira <48070464+alcpereira@users.noreply.github.com> * chore: updated the options docs * chore: updated tests after feedback --------- Co-authored-by: alcpereira <48070464+alcpereira@users.noreply.github.com> * chore: rename new bidi flag * chore: update deps * chore: provide changelogs --------- Co-authored-by: alcpereira <48070464+alcpereira@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With BiDi support, passing extra options when capturing screenshots is possible.
For example, full-page screenshots can now be generated more easily — see the browsingContextCaptureScreenshot docs.
This PR
by using BiDi for Full Page Desktop Web screenshots.
This can be enabled and disabled on the service
or on the test level