[rb] implement toggle for BiDi and Classic implementations#14092
[rb] implement toggle for BiDi and Classic implementations#14092titusfortner merged 1 commit intotrunkfrom
Conversation
PR Review 🔍
|
PR Code Suggestions ✨
|
CI Failure Feedback 🧐(Checks updated until commit b41d57f)
✨ 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 |
050abb3 to
b41d57f
Compare
|
These test failures are weird protoc compile issues that don't make sense and definitely don't impact this PR (and intermittently pass on rerun 🤷). The RBE tests are passing is the important piece. |
…Q#14092) [rb] use BiDiBridge subclass when web_socket_url is true
User description
This is a much simpler implementation of, and replaces #13126
Description
"webSocketUrl": trueto the driver should give the right failure message if it is not supported, bindings don't have to work around it#bidionBridgegives a warning that web_socket_url must be used to access BiDi (this is the real reason to pass the bridge to the BiDi classes and not just the bidi instance; the warning is in one place and works everywhere)Motivation and Context
This is a prerequisite for #13995
PR Type
Enhancement
Description
BiDiBridgeclass to handle BiDi-specific logic.create_bridgemethod to useBiDiBridgewhenwebSocketUrlcapability is true.BiDiBridgein the remote module.Bridgeclass to remove BiDi-specific logic and updated thebidimethod to raise an error ifweb_socket_urlis not enabled.Changes walkthrough 📝
driver.rb
Use `BiDiBridge` subclass based on `webSocketUrl` capabilityrb/lib/selenium/webdriver/common/driver.rb
create_bridgemethod to useBiDiBridgesubclass whenwebSocketUrlis true.remote.rb
Autoload `BiDiBridge` in remote modulerb/lib/selenium/webdriver/remote.rb
BiDiBridge.bidi_bridge.rb
Implement `BiDiBridge` class with session managementrb/lib/selenium/webdriver/remote/bidi_bridge.rb
BiDiBridgeclass inheriting fromBridge.create_session,quit, andclosemethods inBiDiBridge.bridge.rb
Refactor `Bridge` class to remove BiDi logicrb/lib/selenium/webdriver/remote/bridge.rb
Bridgeclass.bidimethod to raise an error ifweb_socket_urlis notenabled.