-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[dotnet] Enhance PrintOptions class to support for predefined and cus… #15144
[dotnet] Enhance PrintOptions class to support for predefined and cus… #15144
Conversation
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.
A couple of quick things, otherwise looks great!
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.
A couple more changes, thanks
Addressed all review comments @RenderMichael and @nvborisenko |
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.
Thanks! Looks very nice
Just final minor tweaks and looks good to me. |
@nvborisenko, @RenderMichael Thank you once again for reviewing and providing feedback. I have incorporated the updated final formatting changes as well. Please take a moment to review them. |
CI Format is failing, please fix formatting (and last unresolved comment). |
@nvborisenko , Removed the extra lines at the end. Please check if we are good now. |
@nvborisenko @RenderMichael , Seems all the required CI checks have been passed finally. |
Finally, thank you! |
yes! Thank you too @nvborisenko :) |
User description
PR Description
This PR implements the .NET version based on the original Java implementation: Original PR - Java.
The issue addressed in this PR revolves around the lack of predefined paper size options in the
PrintOptions
class for Selenium WebDriver in .NET. While the documentation suggests the ability to set commonly used paper sizes such as "A4," "Legal," and "Tabloid," the actual implementation lacked support for these features. This discrepancy created a usability gap and inconsistency with the expected functionality. The PR introduces predefined paper sizes, enhances usability through convenient methods, and aligns the .NET implementation with similar functionality in the Java WebDriver API.PR Type
Enhancement, Tests
Description
Added predefined paper sizes (A4, Legal, Letter, Tabloid) to
PrintOptions
.Introduced a default page size (A4) in the
PrintOptions
constructor.Added a method to set custom or predefined page sizes with validation.
Implemented unit tests for default, predefined, and custom page sizes.
Changes walkthrough 📝
PrintOptions.cs
Add predefined paper sizes and default A4 to PrintOptions
dotnet/src/webdriver/PrintOptions.cs
SetPageSize
method with null validation.PrintTest.cs
Add unit tests for PrintOptions page sizes
dotnet/test/common/PrintTest.cs