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:
|
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.