[java][bidi] Route navigation commands through BiDi#17232
[java][bidi] Route navigation commands through BiDi#17232krishnamohan-kothapalli wants to merge 5 commits intoSeleniumHQ:trunkfrom
Conversation
Review Summary by QodoRoute Java navigation commands through WebDriver BiDi protocol
WalkthroughsDescription• Routes navigation commands through WebDriver BiDi protocol • Maps pageLoadStrategy capability to BiDi ReadinessState enum • Implements fallback to Classic WebDriver when BiDi unavailable • Adds comprehensive integration tests for BiDi navigation File Changes1. java/src/org/openqa/selenium/remote/RemoteWebDriver.java
|
Code Review by Qodo
1.
|
aae4c08 to
1eee757
Compare
|
Could you please rebase the branch correctly? It is showing 3000+ file changes. |
1eee757 to
c9f071a
Compare
Implements get(), back(), forward(), and refresh() via BrowsingContext when webSocketUrl capability is present, falling back to Classic otherwise. Maps pageLoadStrategy to ReadinessState: normal->COMPLETE, eager->INTERACTIVE, none->NONE. Adds integration tests covering all navigation commands with BiDi enabled. Fixes SeleniumHQ#13995
- Guard BiDi path with instanceof HasBiDi check to prevent IllegalArgumentException on plain RemoteWebDriver instances - Check webSocketUrl instanceof String (not just != null) to avoid false positive on Boolean.TRUE during session setup - Handle PageLoadStrategy as both enum and String when mapping to ReadinessState to fix eager/none being silently ignored Addresses review feedback on SeleniumHQ#13995
c9f071a to
50a7aac
Compare
|
@VietND96 Fixed! The CLA assistant was treating my local machine email as a different user, so I had to clean up the commit history. The branch now has only the 2 relevant commits, and all committers have signed the CLA. |
|
I thing the test in RBE is failing because your navigation isn't handling alerts that may be present during pageload. You need a listener and some logic to handle them, since the old The failing test is: |
Implements get(), back(), forward(), and refresh() via BrowsingContext when webSocketUrl capability is present, falling back to Classic otherwise. Maps pageLoadStrategy to ReadinessState: normal->COMPLETE, eager->INTERACTIVE, none->NONE. Adds integration tests covering all navigation commands with BiDi enabled.
#13995
What does this PR do?
Routes get(), back(), forward(), and refresh() through the WebDriver BiDi
protocol when BiDi is enabled (webSocketUrl capability present), falling
back to Classic WebDriver commands otherwise.
This is the Java implementation of the navigation proof-of-concept agreed
at the Selenium Dev Summit — the minimum required for Selenium 5 and the
reference pattern for BiDi/Classic switching across all bindings.
Implementation Notes
to BiDi ReadinessState: normal→COMPLETE, eager→INTERACTIVE, none→NONE
proper context tracking is deferred to a follow-up)
Additional Considerations
commands until Edge BiDi support is complete
Types of changes
New feature (non-breaking change which adds functionality and tests!)