-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
JS: add PrintOptions with predefined and custom sizes; margins; tests (#15072) #16465
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
base: trunk
Are you sure you want to change the base?
JS: add PrintOptions with predefined and custom sizes; margins; tests (#15072) #16465
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
PR Code Suggestions ✨Explore these optional code suggestions:
|
User description
Summary
PrintOptions
in JS mirroring other bindings (Python, Java, .NET, Ruby).What’s in this PR
javascript/webdriver/print_options.js
{ orientation, scale, background, shrinkToFit, page: { width, height }, margin: { top, right, bottom, left }, pageRanges }
javascript/webdriver/test/print_options_test.js
Why
Scope / Impact
Validation
bazel test //javascript/webdriver:test --test_output=errors
References
PR Type
Enhancement
Description
Implement PrintOptions class mirroring other language bindings
Support predefined paper sizes (A4, Letter, Legal, Tabloid)
Add custom page size, margins, orientation, scale configuration
Include comprehensive test suite for all PrintOptions features
Diagram Walkthrough
File Walkthrough
print_options.js
PrintOptions class with paper sizes and margins
javascript/webdriver/print_options.js
orientation, 1.0 scale, A4 page size)
centimeters
with input validation
format
communication
print_options_test.js
Comprehensive test suite for PrintOptions
javascript/webdriver/test/print_options_test.js