Skip to content

Conversation

kblok
Copy link
Member

@kblok kblok commented Oct 15, 2025

No description provided.

@kblok kblok requested a review from Copilot October 15, 2025 12:48
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds foundational WebDriver BiDi (bidirectional protocol) support alongside existing CDP implementation, refactoring abstractions (sessions, handles, targets) and introducing a parallel BiDi object model (browser, contexts, pages, frames, network, realms, etc.). Also updates tests to run under either protocol and introduces protocol selection and related feature adaptations (navigation, screenshots, dialogs, request handling). Key refactors remove CDP-specific members from shared interfaces and introduce protocol-agnostic abstractions.

  • Introduces ProtocolType enum and internal protocol selection plumbing (LaunchOptions, ConnectOptions, tests).
  • Adds extensive BiDi implementation (BidiBrowser, contexts, pages, frames, realms, network/request/response, input, dialog) plus supporting abstractions (ICDPSession, ICdpHandle).
  • Refactors existing CDP-specific code paths (Target, NetworkManager, Page, ElementHandle, ExecutionContext, query selector registry) to be protocol neutral and updates tests accordingly.

Reviewed Changes

Copilot reviewed 147 out of 148 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
ProtocolType.cs Adds protocol enumeration enabling selection between CDP and BiDi.
LaunchOptions.cs / ConnectOptions.cs Adds internal Protocol selection and initial page wait option.
ICDPSession / ICdpHandle Introduces protocol-agnostic CDP abstractions for handles/sessions.
Target / TargetChangedArgs / CdpTarget et al. Refactors target model; moves CDP specifics into CdpTarget; adjusts TargetInfo access.
NetworkManager.cs & CdpBrowser.cs Moves certificate ignore logic; adapts network manager to be protocol neutral.
Browser.cs / BidiBrowser.cs Adds BiDi browser implementation and protocol property; adjusts dispose logic.
Bidi/* (many files) Implements BiDi versions of browser, contexts, pages, frames, realms, networking, input, dialogs.
Page / Frame / ElementHandle changes Protocol neutral event raising, screenshot handling, selector registry centralization.
CustomQuerySelectorRegistry.cs Introduces static Default registry shared across components.
NavigationOptions.cs Adds optional CancellationToken support for navigation.
NavigationException.cs Adds inner exception for richer error context.
Tests (multiple) Adapts tests for dual protocol, adds BiDi assertions, adjusts expectations, adds protocol selection in constants.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@kblok kblok changed the base branch from master to v21 October 15, 2025 13:13
@kblok kblok merged commit e79e75e into v21 Oct 16, 2025
21 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant