-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[rb] create user-friendly method for enabling bidi #14284
base: trunk
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
CI Failure Feedback 🧐(Checks updated until commit 8dc3ccb)
✨ CI feedback usage guide:The CI feedback tool (
In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:
where Configuration options
See more information about the |
@@ -91,6 +91,14 @@ def add_option(name, value = nil) | |||
@options[name] = value | |||
end | |||
|
|||
def enable_bidi! |
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.
Can we allow passing it to the constructor as well?
Selenium::WebDriver::Options.chrome(bidi: true)
User description
This matches what is being done in other languages (#13991)
In general it isn't user friendly that that
web_socket_url
value to the driver is a boolean, but the response is a string. This provides a more obvious name for users to set the property.This allows Options class to use
#enable_bidi!
and#bidi?
as the booleans for the options.Capabilities will return
driver.capabilities[:web_socket_url]
with either nil or the value of the url.We ok with my use of bang and predicate here?
PR Type
Enhancement, Tests
Description
enable_bidi!
method toSelenium::WebDriver::Options
to setweb_socket_url
to true.bidi?
method to check ifweb_socket_url
is enabled.web_socket_url
andbidi?
method behavior.enable_bidi!
method, verifying setting and querying of bidi option.Changes walkthrough 📝
options.rb
Add methods to enable and check bidi in options
rb/lib/selenium/webdriver/common/options.rb
enable_bidi!
method to setweb_socket_url
to true.bidi?
method to check ifweb_socket_url
is enabled.options_spec.rb
Add integration test for enabling bidi in Chrome options
rb/spec/integration/selenium/webdriver/chrome/options_spec.rb
web_socket_url
andbidi?
method behavior.options_spec.rb
Add unit test for enable_bidi! method in Chrome options
rb/spec/unit/selenium/webdriver/chrome/options_spec.rb
enable_bidi!
method.