Skip to content

Conversation

@kblok
Copy link
Member

@kblok kblok commented Jan 9, 2026

No description provided.

Copilot AI review requested due to automatic review settings January 9, 2026 12:01
Copy link
Contributor

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

This pull request implements the "evaluate on new document" functionality for the WebDriver BiDi protocol, enabling preload scripts that execute before page load. The implementation adds dictionary serialization support and the three core methods needed for this feature.

  • Implements EvaluateFunctionOnNewDocumentAsync, EvaluateExpressionOnNewDocumentAsync, and RemoveScriptToEvaluateOnNewDocumentAsync for BiDi
  • Adds dictionary argument serialization to support complex object parameters
  • Removes test expectations for evaluation.spec tests that now pass with BiDi

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
lib/PuppeteerSharp/Bidi/BidiRealm.cs Adds IDictionary handling in FormatArgumentAsync and implements SerializeDictionaryAsync for recursive dictionary serialization
lib/PuppeteerSharp/Bidi/BidiPage.cs Implements evaluate on new document methods using BiDi's preload script functionality with appropriate function wrapping
lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json Removes test expectation failures for evaluation.spec tests that now pass with the new BiDi implementation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kblok kblok merged commit ca993de into v21 Jan 9, 2026
23 of 25 checks passed
@kblok kblok deleted the bidi-pass-evaluate-on-new-document branch January 9, 2026 13:29
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.

2 participants