Skip to content

Implement frame.frameElement() for WebDriver BiDi#3152

Merged
kblok merged 1 commit intomasterfrom
implement-upstream-change-3115
Feb 18, 2026
Merged

Implement frame.frameElement() for WebDriver BiDi#3152
kblok merged 1 commit intomasterfrom
implement-upstream-change-3115

Conversation

@kblok
Copy link
Member

@kblok kblok commented Feb 18, 2026

Summary

  • Overrides FrameElementAsync in BidiFrame to use native BiDi browsingContext.locateNodes with ContextLocator, enabling proper support for frames inside shadow DOM
  • Makes startNodes parameter optional in BrowsingContext.LocateNodesAsync
  • Makes FrameElementAsync virtual in the base Frame class to allow protocol-specific overrides
  • Adds three FrameElement tests ported from upstream (should work, should handle shadow roots, should return ElementHandle in the correct world)
  • Removes upstream test expectation for BiDi shadow root failure (now fixed)
  • Adds local test expectations for pre-existing CDP FrameElement issues

Upstream PR

Implements puppeteer/puppeteer#14629

Closes #3115

Test plan

  • All 3 FrameElement tests pass on Firefox/BiDi
  • Full test suite passes on Firefox/BiDi (742 passed, 267 skipped)
  • Chrome/CDP FrameElement tests properly handled by local expectations (pre-existing CDP limitations)

🤖 Generated with Claude Code

@kblok kblok force-pushed the implement-upstream-change-3115 branch from d32d11c to 55c1a8a Compare February 18, 2026 16:30
Override FrameElementAsync in BidiFrame to use native BiDi
browsingContext.locateNodes with ContextLocator, enabling proper
support for frames in shadow DOM. Also adds FrameElement tests
ported from upstream.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

feat(webdriver): implement frame.frameElement() for WebDriver BiDi

1 participant