Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebDriver BiDi: "browsingContext.captureScreenshot" accepts quality from 0 to 1 #34097

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

whimboo
Copy link
Contributor

@whimboo whimboo commented Dec 19, 2024

While Playwright accepts a range for the quality argument from 0 to 100, the WebDriver BiDi protocol defines it from 0 to 1.

This PR fixes it by converting the Playwright range to [0..1]. With the patch applied not only 4 tests within page-screenshot.spec.ts are passing but 39.

@yury-s can you please take a look?

Copy link
Member

@yury-s yury-s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@yury-s yury-s merged commit edd7897 into microsoft:main Dec 19, 2024
29 checks passed
Copy link
Contributor

Test results for "tests 1"

10 flaky ⚠️ [firefox-page] › page/page-evaluate.spec.ts:403:3 › should throw for too deep reference chain @firefox-ubuntu-22.04-node18
⚠️ [installation tests] › playwright-electron-should-work.spec.ts:31:5 › electron should work with special characters in path @package-installations-macos-latest
⚠️ [webkit-library] › library/browsercontext-clearcookies.spec.ts:52:3 › should remove cookies by name @webkit-ubuntu-22.04-node18
⚠️ [webkit-library] › library/browsertype-connect.spec.ts:683:5 › run-server › should upload large file @webkit-ubuntu-22.04-node18
⚠️ [webkit-library] › library/inspector/cli-codegen-1.spec.ts:147:7 › cli codegen › should make a positioned click on a canvas @webkit-ubuntu-22.04-node18
⚠️ [webkit-library] › library/proxy.spec.ts:125:3 › should authenticate @webkit-ubuntu-22.04-node18
⚠️ [webkit-library] › library/selector-generator.spec.ts:358:5 › selector generator › should match in deep shadow dom @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › page/page-screenshot.spec.ts:364:5 › page screenshot › path option should work @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › page/selectors-react.spec.ts:114:7 › react18 › should support truthy querying @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › page/selectors-vue.spec.ts:87:7 › vue2 › should partially match by props @webkit-ubuntu-22.04-node18

37387 passed, 650 skipped
✔️✔️✔️

Merge workflow run.

@mxschmitt
Copy link
Member

FYI, starting from the next PRs (after #34099) WebDriver BiDi tests should run on PRs as well.

@whimboo whimboo deleted the screenshot-quality branch December 19, 2024 21: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.

3 participants