-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
[BiDi][rb] Add set viewport for browsing context #15290
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_viewport
method to manage browsing context viewport.Implemented integration test for
set_viewport
functionality.Updated type signature for
set_viewport
in Ruby interface file.Changes walkthrough 📝
browsing_context.rb
Add `set_viewport` method for browsing context
rb/lib/selenium/webdriver/bidi/browsing_context.rb
set_viewport
method to set viewport dimensions and device pixelratio.
@bidi.send_cmd
to execute thebrowsingContext.setViewport
command.
browsing_context.rbs
Update type signature for `set_viewport` method
rb/sig/lib/selenium/webdriver/bidi/browsing_context.rbs
set_viewport
method.set_viewport
.browsing_context_spec.rb
Add integration test for `set_viewport` method
rb/spec/integration/selenium/webdriver/bidi/browsing_context_spec.rb
set_viewport
method.