[ruby][BiDi] Browsing context commands#11446
Merged
pujagani merged 3 commits intoSeleniumHQ:trunkfrom Dec 21, 2022
Merged
Conversation
p0deje
approved these changes
Dec 20, 2022
Member
There was a problem hiding this comment.
Great job!
May I suggest to re-organize the code a little bit? It would be nice to follow the naming structure where a folder corresponds to a namespace (class/module) and a file name corresponds to a class name. So in your PR it would be:
| file path | full class name |
|---|---|
| rb/lib/selenium/webdriver/bidi/browsing_context/browsing_context.rb | Selenium::WebDriver::BiDi::BrowsingContext::BrowsingContext |
| rb/lib/selenium/webdriver/bidi/browsing_context/browsing_context_info.rb | Selenium::WebDriver::BiDi::BrowsingContext::BrowsingContextInfo |
| rb/lib/selenium/webdriver/bidi/browsing_context/navigate_result.rb | Selenium::WebDriver::BiDi::BrowsingContext::NavigateResult |
It looks too verbose though, so I suggest the following structure:
| file path | full class name |
|---|---|
| rb/lib/selenium/webdriver/bidi/browsing_context.rb | Selenium::WebDriver::BiDi::BrowsingContext |
| rb/lib/selenium/webdriver/bidi/browsing_context_info.rb | Selenium::WebDriver::BiDi::BrowsingContextInfo |
| rb/lib/selenium/webdriver/bidi/navigate_result.rb | Selenium::WebDriver::BiDi::NavigateResult |
It would make the classes more aligned with the file paths they live in.
9c365e6 to
fcd59a9
Compare
Contributor
Author
|
All changes have been incorporated. Thank you @p0deje :) |
Contributor
|
Thank you @TamsilAmani! |
Member
|
@TamsilAmani this test is failing on all Chrome runs currently — |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add BrowsingContext module commands based on the spec.
Refer to BiDi spec doc for details.
Motivation and Context
Support BrowsingContext commands based on the W3C BiDi spec. Currently, the commands supported by browsers are made public. Refer https://wpt.fyi/results/webdriver/tests/bidi/browsing_context?label=experimental&label=master&aligned&view=subtest. As browsers implement the rest of the commands, we can make them public (adding methods will not be a breaking change).
Types of changes
Checklist