[dotnet] Allow setting of PageDimensions and PageMargins in PrintOptions directly#14593
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|
Good progress here, I am going to checksum (using CI). If pass, the I vote for removing |
|
We don't have test for |
|
@nvborisenko sure, I wrote the documentation examples - they should easily port over. |
|
Done |
|
I looked at java implementation, it stores default values on client side. So let's be in sync.
|
Do we want to throw an error when setting as null, or do we want to just set the default in that case and let it continue? |
Definitely throw argument null exception. |
… to check for ArgumentNullExceptions being thrown...
|
@nvborisenko Could you explain the code changes you made? Particularly PageSizeDictionary()s changes, I can see the logic in the changes to the main sets, as well as refining the test example to just test construction instead of construction inside of the print command. |
|
Lol thank you Those all make sense to me |
…ons directly (SeleniumHQ#14593) And make possibility to use object initializer language feature --------- Co-authored-by: Nikolay Borisenko <22616990+nvborisenko@users.noreply.github.com>
…ons directly (SeleniumHQ#14593) And make possibility to use object initializer language feature --------- Co-authored-by: Nikolay Borisenko <22616990+nvborisenko@users.noreply.github.com>



User description
PrintOptions.cs was missing setters for PageMargins and PageDimensions.
Description
added setters in PrintOptions.cs for PageMargins and PageDimensions.
Motivation and Context
fixes issue
Types of changes
Checklist
PR Type
Bug fix
Description
PageDimensionsandPageMarginsin thePrintOptionsclass to allow modification of these properties.Changes walkthrough 📝
PrintOptions.cs
Add missing setters for PageDimensions and PageMarginsdotnet/src/webdriver/PrintOptions.cs
PageDimensionsproperty.PageMarginsproperty.