-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[BiDi][rb] Add set viewport for browsing context #15290
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
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.
Seems good. Couple of minor questions about defaulting / documenting
* Add set viewport for browsing context * Fix comment * Fix device_pixel_ratio
User description
Motivation and Context
This PR implements the setViewport command for the Ruby binding
In order to add full support for the BiDi protocol we are implementing https://w3c.github.io/webdriver-bidi/#command-browsingContext-setViewport for the Ruby binding
Types of changes
Checklist
PR Type
Enhancement, Tests
Description
Added
set_viewportmethod to manage browsing context viewport.Implemented integration test for
set_viewportfunctionality.Updated type signature for
set_viewportin Ruby interface file.Changes walkthrough 📝
browsing_context.rb
Add `set_viewport` method for browsing contextrb/lib/selenium/webdriver/bidi/browsing_context.rb
set_viewportmethod to set viewport dimensions and device pixelratio.
@bidi.send_cmdto execute thebrowsingContext.setViewportcommand.
browsing_context.rbs
Update type signature for `set_viewport` methodrb/sig/lib/selenium/webdriver/bidi/browsing_context.rbs
set_viewportmethod.set_viewport.browsing_context_spec.rb
Add integration test for `set_viewport` methodrb/spec/integration/selenium/webdriver/bidi/browsing_context_spec.rb
set_viewportmethod.