-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix Python example for PrintOptions by replacing scale with page_height and page_width #2122
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
Fix Python example for PrintOptions by replacing scale with page_height and page_width #2122
Conversation
👷 Deploy request for selenium-dev pending review.Visit the deploys page to approve it
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch 🚀
Thank you @yvsvarma !
…ht and page_width (#2122)[deploy site] Fix Python example for PrintOptions to address issue #2095 Co-authored-by: Sri Harsha <[email protected]> 215adae
Thank you for your time in reviewing Sri! @harsha509 |
User description
Description
This PR updates the Python example for
PrintOptionsby replacing the incorrect use of thescaleattribute with the appropriate methods (page_heightandpage_width) based on the current Selenium repository implementation.Motivation and Context
A previous commit addressed the Java example for
PrintOptionsin PR #2118. This PR extends that work to Python, addressing issue #2095, where a user specifically requested a corrected Python example. The updated example demonstrates the correct use ofPrintOptionsfor setting page dimensions.Types of Changes
Checklist
PR Type
Bug fix, Documentation
Description
Fixed Python example for
PrintOptionsto correctly demonstratepage_heightandpage_width.Replaced incorrect
scaleusage withpage_heightin thetest_sizefunction.Addressed user feedback from issue [🐛 Bug]: No size example, two scale examples #2095 regarding missing
PaperSizeexample.Improved documentation consistency with Selenium repository implementation.
Changes walkthrough 📝
test_print_options.py
Updated `test_size` to use `page_height` instead of `scale`examples/python/tests/interactions/test_print_options.py
scalewithpage_heightin thetest_sizefunction.page_heightto validate the change.