Fix incorrect A4 page size in Java PrintOptionsTest - #2767
Merged
Conversation
new PageSize(27.94, 21.59) is actually PageSize.US_LETTER's dimensions mislabeled as A4 (real A4 is 29.7x21.0 cm). Use the built-in PageSize.ISO_A4 constant instead, available since Selenium 4.47.0. Fixes #2753 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
PR Summary by QodoFix A4 page size in Java PrintOptionsTest by using PageSize.ISO_A4
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
✅ Deploy Preview for selenium-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can group findings by type and pick your Finding display, from Minimal to Full |
Contributor
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.
Thanks for contributing to the Selenium site and documentation!
A PR well described will help maintainers to review and merge it quickly
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, and help reviewers by making them as simple and short as possible.
Description
PrintOptionsTest.TestSizeset the page size withnew PageSize(27.94, 21.59)and labeled it "A4 size in cm".PageSize's constructor is(height, width), and27.94 x 21.59cm is actuallyPageSize.US_LETTER's dimensions, not A4 (real ISO A4 is29.7 x 21.0cm). This replaces the hardcoded, mislabeled values with the built-inPageSize.ISO_A4constant (available since Selenium 4.47.0, which this repo's Java examples already depend on).Motivation and Context
Fixes #2753 — the example code was silently teaching the wrong dimensions for A4 paper.
Types of changes
No translated-language duplicates of this Java example exist for
PrintOptionsTest's size test, and no docs line-number references shifted, so no other files needed updating.Checklist
This is a Java-example-only change with no docs/layout edits, so a Hugo render wasn't applicable here. Verified instead with
mvn test -Dtest=PrintOptionsTest(7/7 passing).