Skip to content

feat(web)!: WebDriver BiDi driver replaces Playwright - #1503

Open
okwasniewski wants to merge 317 commits into
mainfrom
oskar/webdriver-bidi
Open

okwasniewski wants to merge 317 commits into
mainfrom
oskar/webdriver-bidi

Conversation

@okwasniewski

@okwasniewski okwasniewski commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Summary

What breaks is in .changeset/web-bidi-only.md. Limits are in docs/reference/web.mdx.

Benchmark totals (before the rebase; 20 warm / 10 cold iterations, M5 Pro, headless)

Total PW chromium BiDi chromium PW firefox BiDi firefox
sum of p50s, every scenario (ms) 1534 981 (-36%) 2623 2116 (-19%)
cold launch + new page + 6 agent steps (ms) 334 274 (-18%) 768 1279 (+66%)
testbed wall clock, median of 3 (ms) 17525 16895 (-4%) 21102 20980 (-1%)
node + browser CPU, warm loop (s) 51.7 20.3 (-61%) 77.7 33.7 (-57%)
peak RSS, node + browser (MB) 1405 1542 (+10%) 2351 2644 (+12%)

Firefox cold launch is slower: the Remote Agent holds session.new until startup finishes (925 ms vs 314 ms), once per worker.

Issue

Spike, no issue.

Verified

Ran it locally: yes

  • @e2e-dev/web: 2735 tests on Chromium and Firefox, 0 failures, on Node 24 and on Node 22.22.3. One env-gated skip: the crosscheck benchmark scenarios, which run in benchmark.yml.
  • Testbed through the built CLI on Chromium (589 tests), and on Firefox without the Playwright-tagged tests: all pass.
  • Reviewer repros rerun on the head (web font under a route, HTTP cache, tracked inputs, binary bodies in route.fetch(), attach on a loaded tab, Electron 45.3.3, a consumer project with skipLibCheck: false): all pass.
  • e2e 4899 and core tests pass, and the 13 other packages' tests. Build, typecheck, oxlint, fallow, docs, plugin, MCP, peer-range, consumer-types, and changeset checks are clean.

Checklist

  • Changeset added (pnpm changeset) for any change to a published package, or the change is testbed, docs, or CI only.
  • Breaking change: title carries !, the changeset body names what breaks and what replaces it.
  • Docs updated in the same PR: the docs/**/*.mdx page for the behavior, and skills/e2e/ if the skill describes it.
  • Contract change: emitted .d.ts reviewed, tests/types/sdk-types.ts updated; wire change edits the schema and both fixtures.
  • Engine contract change (e2e/engine): changesets for e2e, @e2e-dev/web, and @e2e-dev/mobile.

@github-actions github-actions Bot added the size:XXL 1,000+ changed lines, not counting tests, fixtures, translated docs, or the lockfile label Oct 31, 2026
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e web: 93 passed

All 93 tests in 42 files
Test Time
🟢 tests/aria-hidden-flow.e2e.ts · 2 passed 1.0s
🟢 aria hidden flow › picks the Pro plan by its visible text and confirms it 775ms
🟢 aria hidden flow › another plan shows the error and keeps the picker open 237ms
🟢 tests/async-states.e2e.ts · 2 passed 7.0s
🟢 async states › reads the code off the transient toast and verifies it once the button enables 2.3s
🟢 async states › a wrong code is rejected after the toast has gone 4.8s
🟢 tests/canvas-only.e2e.ts · 2 passed 422ms
🟢 canvas only › taps square, circle, then diamond at their pixel coordinates 219ms
🟢 canvas only › a shape out of order paints the error and resets progress 203ms
🟢 tests/canvas-whiteboard.e2e.ts · 2 passed 755ms
🟢 canvas whiteboard › drags both shapes into their slots and saves 459ms
🟢 canvas whiteboard › bounces a shape off the wrong slot and refuses to save early 296ms
🟢 tests/cart-totals.e2e.ts · 2 passed 533ms
🟢 cart totals › increasing a quantity updates the line total but the order summary stays stale (planted bug) 296ms
🟢 cart totals › a quantity never drops below one 237ms
🟢 tests/checkout-review.e2e.ts · 1 passed 293ms
🟢 shows a raw greeting token and an undefined delivery date (planted bug), yet places the order 293ms
🟢 tests/context-menu-trap.e2e.ts · 2 passed 774ms
🟢 context menu trap › right-click opens nothing; the row menu renames the file 421ms
🟢 context menu trap › the decoy menu items refuse and keep the file 353ms
🟢 tests/control-inventory.e2e.ts · 8 passed 4.4s
🟢 control inventory › check sets the checkbox and the radio without flipping a set one 379ms
🟢 control inventory › check picks a radio the pick replaces with its summary 289ms
🟢 control inventory › a long press and a double click are told apart from a tap 1.2s
🟢 control inventory › the file menu opens on right-click only and Rename renames the file 480ms
🟢 control inventory › setInputFiles attaches files named from the project root 206ms
🟢 control inventory › the details view is left through the browser history 250ms
🟢 control inventory › scrollIntoView brings the footnote into view 203ms
🟢 control inventory › every exercise done shows the success message 1.4s
🟢 tests/css-content-ui.e2e.ts · 2 passed 458ms
🟢 css content ui › the tile labelled Ship it advances and confirming ships 264ms
🟢 css content ui › a wrong tile shows the CSS-rendered error and keeps the picker 194ms
🟢 tests/date-picker.e2e.ts · 2 passed 788ms
🟢 date picker › navigates three months ahead and books the required date 439ms
🟢 date picker › confirming without the exact date shows the error 349ms
🟢 tests/debounced-search.e2e.ts · 2 passed 2.9s
🟢 debounced search › a decoy one character off is refused 1.5s
🟢 debounced search › picking the exact item adds it to the cart 1.4s
🟢 tests/deferred-dialog.e2e.ts · 1 passed 1.1s
🟢 one submit opens one confirm, even when double-clicked 1.1s
🟢 tests/div-soup.e2e.ts · 2 passed 892ms
🟢 div soup › a wrong code is rejected 390ms
🟢 div soup › the right code grants access after the delete tile fixes a typo 502ms
🟢 tests/drag-and-drop.e2e.ts · 2 passed 742ms
🟢 drag and drop › an out-of-order item resets the dropzone 387ms
🟢 drag and drop › dropping Banana then Cherry passes 355ms
🟢 tests/filter-deep-link.e2e.ts · 2 passed 408ms
🟢 filter deep link › filtering writes the query to the URL 219ms
🟢 filter deep link › opening a shared link restores the filter 189ms
🟢 tests/gift-card-purchase.e2e.ts · 3 passed 925ms
🟢 gift card purchase › refuses to buy without an amount 293ms
🟢 gift card purchase › refuses a recipient without an at sign 336ms
🟢 gift card purchase › sends the gift card 296ms
🟢 tests/hover-menu.e2e.ts · 2 passed 681ms
🟢 hover menu › a decoy leaf is refused 313ms
🟢 hover menu › hovering Account, then Billing, reaches Redeem voucher 368ms
🟢 tests/iframe-form.e2e.ts · 2 passed 687ms
🟢 iframe form › a wrong code is refused by the host page 326ms
🟢 iframe form › the code read from one frame applies through the other 361ms
🟢 tests/image-only-ui.e2e.ts · 3 passed 757ms
🟢 image only ui › the icons have no names, so the bare svg locator is ambiguous 228ms
🟢 image only ui › a wrong icon shows the error image and keeps the icons 256ms
🟢 image only ui › tapping the star, then the heart, verifies the icons 273ms
🟢 tests/infinite-scroll.e2e.ts · 1 passed 3.2s
🟢 scrolls the feed until the Golden Ticket loads, then claims it 3.2s
🟢 tests/kanban-board.e2e.ts · 3 passed 1.1s
🟢 kanban board › pointer drags move both cards into the goal layout 558ms
🟢 kanban board › a swipe along a path drags a card as well 277ms
🟢 kanban board › a plain tap moves nothing and the untouched board is rejected 253ms
🟢 tests/login-form.e2e.ts · 4 passed 1.0s
🟢 login form › rejects a malformed email 250ms
🟢 login form › rejects a short password 230ms
🟢 login form › rejects an unknown account 246ms
🟢 login form › signs in and logs out 298ms
🟢 tests/lying-labels.e2e.ts · 4 passed 891ms
🟢 lying labels › the button whose accessible name says Pay now is the wrong one 201ms
🟢 lying labels › a text match for Pay now catches the decoy phrase too 165ms
🟢 lying labels › the field whose accessible name says Amount is the wrong one 265ms
🟢 lying labels › visible text drives the payment through 260ms
🟢 tests/native-dialogs.e2e.ts · 3 passed 649ms
🟢 native dialogs › answers the confirm, prompt, and alert chain 204ms
🟢 native dialogs › dismissing the confirm cancels the order 212ms
🟢 native dialogs › a wrong gift code is rejected 233ms
🟢 tests/new-tab-flow.e2e.ts · 2 passed 564ms
🟢 new tab flow › reads the code in the tab the app opens and enters it back in the original tab 289ms
🟢 new tab flow › a tap that opens a tab leaves the screen on the original tab, and activate shows the new one 275ms
🟢 tests/newsletter-signup.e2e.ts · 1 passed 2.2s
🟢 subscribe renders no feedback and logs a TypeError (planted bug) 2.2s
🟢 tests/onboarding-wizard.e2e.ts · 5 passed 8.3s
🟢 onboarding wizard › back keeps what was typed and the brief comes back with it 362ms
🟢 onboarding wizard › the address step takes the brief through its bare-div dropdown 496ms
🟢 onboarding wizard › the profile step steers the calendar three decades back 1.7s
🟢 onboarding wizard › the preferences step flips the toggles the brief names and leaves the trap off 2.7s
🟢 onboarding wizard › the review step repeats the brief and finishes with the PIN 3.0s
🟢 tests/order-history.e2e.ts · 2 passed 1.9s
🟢 order history › overview and settings render their panels 369ms
🟢 order history › the orders tab never leaves its loading state (planted bug) 1.5s
🟢 tests/otp-auto-advance.e2e.ts · 3 passed 1.9s
🟢 otp auto-advance › focus advances with each digit and the full code verifies 712ms
🟢 otp auto-advance › backspace on an empty box clears and refocuses the previous one 268ms
🟢 otp auto-advance › a wrong code clears every box and starts over 930ms
🟢 tests/overlay-trap.e2e.ts · 1 passed 840ms
🟢 continues only after the banner and the overlay are gone 840ms
🟢 tests/playbook-cleanup.e2e.ts · 2 passed 868ms
🟢 playbook cleanup › deleting the draft removes it from an exact-name search 478ms
🟢 playbook cleanup › cancelling the dialog keeps the draft searchable 390ms
🟢 tests/price-sorting.e2e.ts · 3 passed 678ms
🟢 price sorting › opens in the featured order with sale prices struck through 185ms
🟢 price sorting › low to high sorts by the original price, not the paid one (planted bug) 223ms
🟢 price sorting › high to low is the same wrong order reversed (planted bug) 270ms
🟢 tests/product-reviews.e2e.ts · 1 passed 1.2s
🟢 the running-shoe page lists coffee-grinder reviews (planted bug) 1.2s
🟢 tests/promo-storefront.e2e.ts · 1 passed 1.5s
🟢 buys a deal once the promo chrome is out of the way 1.5s
🟢 tests/rich-text-editor.e2e.ts · 2 passed 1.1s
🟢 rich text editor › bolding exactly the required word passes the check 534ms
🟢 rich text editor › bold that spills into the previous word fails the check 575ms
🟢 tests/saved-addresses.e2e.ts · 3 passed 1.2s
🟢 saved addresses › adds an address and clears the form 523ms
🟢 saved addresses › ignores an add with an empty field 383ms
🟢 saved addresses › delete shows its toast but keeps the address, on retry too (planted bug) 331ms
🟢 tests/shadow-dom-form.e2e.ts · 2 passed 503ms
🟢 shadow DOM form › rejects a wrong access code 242ms
🟢 shadow DOM form › grants access with the code from the hint inside the root 261ms
🟢 tests/smoke.e2e.ts · 1 passed 388ms
🟢 home lists the scenarios and opens one 388ms
🟢 tests/stale-dom.e2e.ts · 1 passed 2.3s
🟢 taps the moving target three times across rebuilds of the list 2.3s
🟢 tests/sticky-chrome.e2e.ts · 1 passed 576ms
🟢 accepts the terms once the button clears the sticky footer 576ms
🟢 tests/virtualized-table.e2e.ts · 1 passed 28.7s
🟢 scrolls the windowed table to the Golden Row and claims it 28.7s
🟢 tests/wishlist.e2e.ts · 2 passed 2.0s
🟢 wishlist › saving toggles the button and the tab badge 404ms
🟢 wishlist › the wishlist tab renders the empty state despite the badge count (planted bug) 1.6s

Tested by e2e 0.23.1 · 1m 30s · web · run artifacts

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e web agent: 34 passed

34 agent steps · 26 replayed from cache · 23 model calls · 113.1k tokens (94% cached) · $0.0044

All 34 tests in 5 files
Test Agent Time
🟢 tests-agent/control-inventory.e2e.ts · 7 passed 7 steps 7.5s
🟢 control inventory › check sets the checkbox and the radio 1 step 728ms
🟢 control inventory › check picks a radio the pick replaces with its summary 1 step 295ms
🟢 control inventory › a long press and a double click are chosen over a plain tap 1 step 914ms
🟢 control inventory › a right-click opens the file menu and Rename renames the file 1 step 2.6s
🟢 control inventory › upload attaches the named project files 1 step 2.4s
🟢 control inventory › back returns from the details view to the inventory 1 step 283ms
🟢 control inventory › scroll_to brings the footnote into view 1 step 271ms
🟢 tests-agent/login-form.e2e.ts · 1 passed 1 step 378ms
🟢 act signs in with the benchmark account 1 step 378ms
🟢 tests-agent/planted-bugs.e2e.ts · 3 passed 3 steps · 6 calls 8.0s
🟢 cart totals: a judgment catches the stale order summary 1 step · 2 calls 2.6s
🟢 checkout review: a judgment catches the broken copy 1 step · 1 call 1.8s
🟢 wishlist: a judgment catches the lost saved items 1 step · 3 calls 3.6s
🟢 tests-agent/scenarios.e2e.ts · 22 passed 22 steps · 17 calls 1m 26s
🟢 act completes shadow-dom-form 1 step · 3 calls 4.7s
🟢 act completes lying-labels 1 step · 3 calls 4.6s
🟢 act completes iframe-form 1 step · 3 calls 4.7s
🟢 act completes infinite-scroll 1 step 3.5s
🟢 act completes virtualized-table 1 step 24.9s
🟢 act completes overlay-trap 1 step 847ms
🟢 act completes sticky-chrome 1 step 1.1s
🟢 act completes async-states 1 step · 3 calls 6.5s
🟢 act completes debounced-search 1 step 2.4s
🟢 act completes hover-menu 1 step 561ms
🟢 act completes drag-and-drop 1 step 521ms
🟢 act completes kanban-board 1 step 816ms
🟢 act completes context-menu-trap 1 step 2.7s
🟢 act completes stale-dom 1 step 513ms
🟢 act completes otp-auto-advance 1 step 815ms
🟢 act completes date-picker 1 step 929ms
🟢 act completes rich-text-editor 1 step 10.3s
🟢 act completes playbook-cleanup 1 step 798ms
🟢 act completes promo-storefront 1 step 2.4s
🟢 act completes new-tab-flow 1 step · 5 calls 9.9s
🟢 act completes gift-card-purchase 1 step 2.5s
🟢 act filters the list and the URL carries the filter 1 step 273ms
🟢 tests-agent/unique-cache.e2e.ts · 1 passed 1 step 327ms
🟢 act adds an address with a run-unique label 1 step 327ms

Tested by e2e 0.23.1 · 1m 43s · web · run artifacts

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e android agent: 20 passed

24 agent steps · 15 replayed from cache · 40 model calls · 229.8k tokens (84% cached) · $0.0147

All 20 tests in 1 file
Test Agent Time
🟢 tests-agent/scenarios.e2e.ts · 20 passed 24 steps · 40 calls 7m 8s
🟢 act completes Login Form 1 step 36.6s
🟢 act completes Infinite Scroll List 1 step 25.9s
🟢 act completes Modal Flow 1 step 15.7s
🟢 act completes Bottom Tabs 1 step 10.2s
🟢 act completes Text Input Variations 1 step 10.1s
🟢 act completes Broken Accessibility 2 steps · 5 calls 19.3s
🟢 act completes Vision Only 2 steps · 1 call 7.3s
🟢 act completes Gestures 1 step · 9 calls 26.4s
🟢 act completes Async States 1 step · 12 calls 30.4s
🟢 act completes Debounced Search 1 step 8.6s
🟢 act completes Huge Virtualized List 1 step 2m 2s
🟢 act completes Flattened Registration Form 2 steps · 1 call 9.8s
🟢 act completes Flattened Login 2 steps · 6 calls 19.3s
🟢 act completes Sticky Chrome Target 1 step 10.5s
🟢 act completes WebView Accessibility 1 step · 6 calls 24.3s
🟢 act completes Permission Prompt 1 step 7.7s
🟢 act completes Product Catalog 1 step 10.3s
🟢 act completes Error Recovery 1 step 10.6s
🟢 act completes Choice Controls 1 step 10.2s
🟢 act completes Sequential Onboarding 1 step 12.0s

Tested by e2e 0.23.1 · 7m 9s · android-emulator · run artifacts

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e android: 1 flaky, 57 passed, 1 skipped

⚠️ 1 flaky test passed on a retry

⚠️ control inventory › a label query resolves a labeled text field
tests/fixtures.ts:61

ACTION_FAILED (beforeEach) at step 3 of 3: expect.toBeVisible getByLabel("Control Inventory. "), after 5.0s

operation timed out: getByLabel("Control Inventory. ")

  • Screen: dev.e2e.benchmark

Evidence: screenshot, log

All 59 tests in 7 files
Test Time
⚠️ tests/controls.e2e.ts · 1 flaky, 23 passed, 1 skipped 2m 57s
⚠️ control inventory › a label query resolves a labeled text field (1 failed attempt first) 6.6s
🟢 control inventory › a labeled field answers name, display value, value reads, fill, and clear 13.0s
🟢 control inventory › a placeholder query and attribute reads find the field 7.0s
🟢 control inventory › a secure field takes a fill and denies value reads 7.2s
🟢 control inventory › press sends a character and Enter through the soft keyboard 8.6s
🟢 control inventory › a field autofocuses on mount and focus() moves the focus 10.9s
🟢 control inventory › toBeFocused follows the focus 13.0s
🟢 control inventory › a switch checks, unchecks, and reports its state 9.5s
🟢 control inventory › checkbox and radio roles answer getByRole, and a checkbox toggles by tap 8.0s
🟢 control inventory › checkbox and radio roles check, uncheck, and report their state 12.1s
🟢 control inventory › a tab role answers getByRole 4.7s
🟢 control inventory › a radio group reports the checked option 8.3s
🟢 control inventory › buttons report disabled, enabled, and a state that arrives later 8.5s
🟢 control inventory › a display: none element is absent rather than hidden, its visible twin attached 8.3s
🟢 control inventory › a header answers its accessible name 4.7s
🟢 control inventory › a tab row answers count, all, texts, filters, positions, and switching 6.1s
🟢 control inventory › a list answers counts, list-form text, reads, and boxes in order 6.5s
⏭️ control inventory › a row contains its texts (skipped: React Native flattens a plain View out of the accessibility tree on both platforms: XCTest and the Android helper report a View with a testID as a leaf beside its children, so filter({ has }) and a query scoped to it match nothing; only Sc…)
🟢 control inventory › a long press lands as one 7.4s
🟢 control inventory › a double tap lands inside the 300 ms window 8.3s
🟢 control inventory › an ambiguous locator fails at once 5.5s
🟢 control inventory › screenshot, restart, and clearState reopen the app on its home list 9.6s
🟢 refusals › verbs a device never declares are refused before the engine 6ms
🟢 refusals › keys the soft keyboard cannot send are refused by the engine 1.7s
🟢 refusals › a missing locator fails as not found once its timeout passes 1.1s
🟢 tests/device-fixture.e2e.ts · 11 passed 1m 36s
🟢 device fixture › setOrientation rotates the window the app measures 5.5s
🟢 device fixture › home leaves the app, openApp brings it back where it was 6.7s
🟢 device fixture › foregroundApp sees the home screen after home() 5.0s
🟢 device fixture › closeApp then openApp relaunches on the home list 8.5s
🟢 device fixture › closeApp leaves the next commands on the same device 9.8s
🟢 device fixture › foregroundApp after closeApp reports the closed session as APP_NOT_OPEN 4.9s
🟢 device fixture › openLink opens the scenario a deep link names 5.5s
🟢 device fixture › device.back pops the scenario 5.1s
🟢 device fixture › unstable_raw reaches the test session through the raw driver 3.9s
🟢 device fixture › setNetwork and setAirplaneMode change what the app sees 17.2s
🟢 device fixture › setLocation and clearLocation change what the app reads 23.7s
🟢 tests/device.e2e.ts · 5 passed 49.2s
🟢 permission prompt › allowing the system dialog enables the microphone 6.5s
🟢 permission prompt › a denied prompt recovers once the permission is granted outside 17.2s
🟢 sequential onboarding echoes the exact values 11.6s
🟢 onboarding rejects a malformed email before advancing 6.4s
🟢 dismissing the keyboard over choice controls leaves them as they were 7.4s
🟢 tests/flows-lists.e2e.ts · 7 passed 3m 21s
🟢 infinite scroll reaches the target item 30.9s
🟢 product catalog adds exactly two of the right variant 10.8s
🟢 gestures: long-press, then swipe left 9.3s
🟢 gestures: double-tap completes the flow 10.5s
🟢 sticky chrome: accept below the fold, then continue 11.7s
🟢 async states: load, pull to refresh, claim through the toast 12.8s
🟢 huge virtualized list reaches row 512 1m 55s
🟢 tests/flows.e2e.ts · 7 passed 1m 0s
🟢 text inputs unlock the submit button 7.4s
🟢 filled text inputs report their values 6.4s
🟢 modal flow confirms through the native alert 10.2s
🟢 bottom tabs act inside the last tab 7.2s
🟢 error recovery retries, then confirms the delete 8.8s
🟢 choice controls place the exact order 8.7s
🟢 debounced search selects the target once results arrive 11.2s
🟢 tests/login-form.e2e.ts · 3 passed 30.8s
🟢 login form › rejects a malformed email 8.9s
🟢 login form › rejects an unknown account 9.3s
🟢 login form › signs in and logs out 12.7s
🟢 tests/smoke.e2e.ts · 1 passed 6.6s
🟢 home lists the scenarios and opens one 6.6s

Tested by e2e 0.23.1 · 10m 49s · android-emulator · run artifacts

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e ios: 56 passed, 1 skipped

All 57 tests in 7 files
Test Time
⏭️ tests/controls.e2e.ts · 23 passed, 1 skipped 3m 15s
🟢 control inventory › a label query resolves a labeled text field 12.4s
🟢 control inventory › a labeled field answers name, display value, value reads, fill, and clear 15.5s
🟢 control inventory › a placeholder query and attribute reads find the field 5.0s
🟢 control inventory › a secure field takes a fill and denies value reads 7.7s
🟢 control inventory › press sends a character and Enter through the soft keyboard 9.4s
🟢 control inventory › a field autofocuses on mount and focus() moves the focus 12.2s
🟢 control inventory › toBeFocused follows the focus 14.9s
🟢 control inventory › a switch checks, unchecks, and reports its state 12.2s
🟢 control inventory › checkbox and radio roles answer getByRole, and a checkbox toggles by tap 9.9s
🟢 control inventory › checkbox and radio roles check, uncheck, and report their state 13.8s
🟢 control inventory › a radio group reports the checked option 9.7s
🟢 control inventory › buttons report disabled, enabled, and a state that arrives later 8.5s
🟢 control inventory › a display: none element is absent rather than hidden, its visible twin attached 7.7s
🟢 control inventory › a header answers its accessible name 4.5s
🟢 control inventory › a tab row answers count, all, texts, filters, positions, and switching 6.3s
🟢 control inventory › a list answers counts, list-form text, reads, and boxes in order 6.8s
⏭️ control inventory › a row contains its texts (skipped: React Native flattens a plain View out of the accessibility tree on both platforms: XCTest and the Android helper report a View with a testID as a leaf beside its children, so filter({ has }) and a query scoped to it match nothing; only Sc…)
🟢 control inventory › a long press lands as one 8.6s
🟢 control inventory › pointer verbs land at the point asked for 10.0s
🟢 control inventory › an ambiguous locator fails at once 5.7s
🟢 control inventory › screenshot, restart, and clearState reopen the app on its home list 12.5s
🟢 refusals › verbs a device never declares are refused before the engine 2ms
🟢 refusals › keys the soft keyboard cannot send are refused by the engine 209ms
🟢 refusals › a missing locator fails as not found once its timeout passes 1.1s
🟢 tests/device-fixture.e2e.ts · 12 passed 1m 55s
🟢 device fixture › setAppearance flips the color scheme the app reads 11.9s
🟢 device fixture › setOrientation rotates the window the app measures 9.4s
🟢 device fixture › the clipboard reads back what was written 6.6s
🟢 device fixture › home leaves the app, openApp brings it back where it was 6.9s
🟢 device fixture › closeApp then openApp relaunches on the home list 8.2s
🟢 device fixture › closeApp leaves the next commands on the same device 12.9s
🟢 device fixture › foregroundApp after closeApp reports the closed session as APP_NOT_OPEN 5.8s
🟢 device fixture › openLink opens the scenario a deep link names 15.5s
🟢 device fixture › device.back pops the scenario 7.8s
🟢 device fixture › unstable_raw reaches the test session through the raw driver 5.6s
🟢 device fixture › setLocation and clearLocation change what the app reads 13.0s
🟢 device fixture › enrollBiometrics and setBiometrics answer a biometric prompt 11.9s
🟢 tests/device.e2e.ts · 3 passed 50.2s
🟢 sequential onboarding echoes the exact values 28.6s
🟢 onboarding rejects a malformed email before advancing 10.1s
🟢 dismissing the keyboard over choice controls leaves them as they were 11.5s
🟢 tests/flows-lists.e2e.ts · 7 passed 4m 20s
🟢 infinite scroll reaches the target item 33.5s
🟢 product catalog adds exactly two of the right variant 11.5s
🟢 gestures: long-press, then swipe left 9.7s
🟢 sticky chrome: accept below the fold, then continue 14.3s
🟢 async states: load, pull to refresh, claim through the toast 13.7s
🟢 huge virtualized list reaches row 512 2m 44s
🟢 web view coupon form applies the code shown on the page 12.9s
🟢 tests/flows.e2e.ts · 7 passed 1m 17s
🟢 text inputs unlock the submit button 14.2s
🟢 filled text inputs report their values 11.3s
🟢 modal flow confirms through the native alert 11.4s
🟢 bottom tabs act inside the last tab 8.3s
🟢 error recovery retries, then confirms the delete 10.4s
🟢 choice controls place the exact order 8.9s
🟢 debounced search selects the target once results arrive 12.7s
🟢 tests/login-form.e2e.ts · 3 passed 48.7s
🟢 login form › rejects a malformed email 13.7s
🟢 login form › rejects an unknown account 14.0s
🟢 login form › signs in and logs out 21.1s
🟢 tests/smoke.e2e.ts · 1 passed 8.7s
🟢 home lists the scenarios and opens one 8.7s

Tested by e2e 0.23.1 · 7m 6s · ios-simulator · run artifacts

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e ios agent: 1 flaky, 20 passed, 1 skipped

25 agent steps · 11 replayed from cache · 63 model calls · 465.9k tokens (83% cached) · $0.0316

⚠️ 1 flaky test passed on a retry

⚠️ act completes Gestures
tests-agent/scenarios.e2e.ts:266

ACTION_FAILED at step 4 of 4: agent.act "Complete this scenario as the screen instructs: long-press the first target, swipe the card left, then double-tap the last target", after 52.0s and 10 model calls

agent.act failed: The long-press and left swipe reached the final step. I double-tapped the final target, but the screen remained on “Double-tap the button below” with no visible completion state, so successful completion could not be verified.

  • Turn 7: double_tap({"target":"n3521"}) → [double_tap] Double-tapped #n3521.
  • Turn 8: tap({"target":"n3557"}) → [tap] Tapped #n3557.
  • Turn 9: tap({"target":"n3593"}) → [tap] Tapped #n3593.
  • Screen: dev.e2e.benchmark / Gestures

Evidence: screenshot, log

All 22 tests in 1 file
Test Agent Time
⚠️ tests-agent/scenarios.e2e.ts · 1 flaky, 20 passed, 1 skipped 25 steps · 63 calls 9m 11s
🟢 act completes Login Form 1 step 41.0s
🟢 act completes Infinite Scroll List 1 step 37.6s
🟢 act completes Modal Flow 1 step 10.2s
🟢 act completes Bottom Tabs 1 step 7.5s
🟢 act completes Text Input Variations 1 step 12.7s
🟢 act completes Broken Accessibility 2 steps · 6 calls 26.9s
🟢 act completes Vision Only 2 steps · 6 calls 28.0s
⚠️ act completes Gestures (1 failed attempt first) 1 step · 9 calls 37.7s
🟢 act completes Async States 1 step · 10 calls 37.7s
🟢 act completes Debounced Search 1 step · 1 call 27.8s
🟢 act completes Flattened Registration Form 2 steps · 1 call 27.2s
🟢 act completes Flattened Login 2 steps · 10 calls 53.4s
🟢 act completes Sticky Chrome Target 1 step · 4 calls 39.7s
🟢 act completes WebView Accessibility 1 step 14.0s
🟢 act completes Permission Prompt 1 step 13.3s
🟢 act completes Photo Picker 1 step · 2 calls 32.8s
🟢 act completes Product Catalog 1 step 10.7s
🟢 act completes Error Recovery 1 step 10.0s
🟢 act completes Choice Controls 1 step · 6 calls 37.2s
🟢 act completes Stripe PaymentSheet 1 step · 8 calls 33.0s
🟢 act completes Apple Pay 1 step 12.7s
⏭️ act completes Apple Pay Billing Address (skipped: the CI simulator's Apple Pay sheet skips the billing-address step, so the scenario cannot be completed there)

Tested by e2e 0.23.1 · 10m 9s · ios-simulator · run artifacts

@okwasniewski
okwasniewski changed the base branch from main to oskar/playwright-parity-tests November 1, 2026 18:40
@okwasniewski
okwasniewski force-pushed the oskar/webdriver-bidi branch 2 times, most recently from 2411751 to 7e2fbc6 Compare November 1, 2026 19:12
@okwasniewski
okwasniewski force-pushed the oskar/playwright-parity-tests branch 2 times, most recently from b9422fc to 22d080f Compare November 4, 2026 16:57
Base automatically changed from oskar/playwright-parity-tests to main November 4, 2026 18:02
@okwasniewski okwasniewski changed the title feat(web): experimental WebDriver BiDi driver feat(web)!: WebDriver BiDi driver replaces Playwright Nov 6, 2026
Comment thread packages/web/src/install/download.ts Dismissed
@okwasniewski
okwasniewski marked this pull request as ready for review November 16, 2026 17:20
@okwasniewski
okwasniewski force-pushed the oskar/webdriver-bidi branch 7 times, most recently from ff9683d to 34d49bb Compare November 16, 2026 17:57
@kdy1
kdy1 dismissed stale reviews from themself November 18, 2026 15:47

All requested changes are in as of 9335b67. Checked and dismissed by a T3 Code automation (Claude) for @kdy1.

Main's new on-demand fixtures test quotes the hint as main words it; this branch says web target, since the engine is no longer Playwright.
@okwasniewski

Copy link
Copy Markdown
Member Author

[claude-fable-5-2] responding on behalf of okwasniewski

@kdy1 thanks for the three reviews. All 13 inline threads have a reply and a fix. The findings that had no thread:

Finding Status
P3 console-text.ts: %d, %i, %f print part of a text argument Fixed in ebdc2d8: a number specifier prints a number (or a bigint) alone, any other argument is NaN.
P3 mask.ts: a masking that throws leaves animations stopped Fixed in d40dcad: it takes off what it put on and sets the animations going again before it throws. Tested with a page that replaced showPopover, for a screenshot and for an observation.
P3 network.ts: dispose() during bind() Fixed in f13ba78: an attempt that ended while the old user context was released binds no new one. The unit test fails without the fix.
app.screenshot() leaves animations finished Fixed in d40dcad, see the mask.ts:75 thread.
attachBrowser cannot name the tab when none or several are visible Not changed. It needs a new option, and its name is Oskar's call.

Two things the fixes changed were caught by the testbed's Playwright suite and fixed before the push: key events for text typed under a held Shift (9335b67) and an option label that starts with a non-breaking space (same commit). The selector change also made a page that replaced Map.prototype.set read as a bad selector; fixed in ac2ab6a.

One thing I noticed and did not fix: on Firefox a cookie value with a non-ASCII character (é) reads back as é after browser.setCookies.

Local runs on this head: pnpm run check, the web suite on Chromium and Firefox, the testbed, and every other package's tests.

@okwasniewski
okwasniewski requested a review from kdy1 November 18, 2026 16:33
@okwasniewski okwasniewski added the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 18, 2026

@kdy1 kdy1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Note

This text was drafted with AI and posted after human approval.

  • Harnesses: T3 Code, Claude Code, Codex
  • AI agents: Claude Opus 5.5 (claude-opus-5-5), Claude Code: co-review, verification runs, and this text, GPT-6.2 Astra (gpt-6.2-astra), Codex: Review Once reviewer, GPT-6.1 Sol (gpt-6.1-sol), Codex: Review Once reviewer, Claude Opus 5.5 (claude-opus-5-5), Claude Code: Review Once reviewer, Claude Sonnet 5.5 (claude-sonnet-5-5), Claude Code: Review Once reviewer

Requesting changes: I ran the cases below on Chromium against main (Playwright, 9d240ac9) and this branch (9bc0c61b) with the same script on each side. One P1 and nine P2 cases behave differently from main. The inline comments give each case, its input, and the result on each side (15 comments).

Most of these regressions are in code that Playwright ran in the browser before and that this PR now implements itself: the selector tokenizer, text normalization, the edit path, the MIME table, and the screenshot mask. More cases of this type are probable. Please add the inputs from the inline comments to the selector-parity and Playwright-parity tests.

Findings that are not inline

  • WebKit removal without a deprecation period (question). web({ browser: 'webkit' }) is accepted on main. On this branch it is INVALID_CONFIG immediately, with no warning first. CONTRIBUTING.md:308-318 requires a 6-month deprecation for a breaking change to a public contract, so the first removal date would be 2027-04-01. The policy does not list @e2e-dev/web exports explicitly, so this depends on whether web({ browser }) counts as a config key. Please say which interpretation applies.
  • Mapper and browser versions (risk, no failure found). packages/web/package.json:63 pins chromium-bidi 159.0.8147-0, but the pinned Chrome is 157.0.8103.38. I did not find a failure that this causes.

Limits

  • I could not start Firefox on my machine ("Could not find profile folder"), so the Firefox item is from reading the code only.
  • I ran the race in actions.ts:67 through openHost and the engine contract (locate, then perform), because the public API cannot add a step between locate and dispatch.

} else {
return { kind: 'refused', reason: 'Element is not an <input>, <textarea> or [contenteditable] element' };
}
const edited = text === '' ? document.execCommand('delete') : document.execCommand('insertText', false, text);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

P1: fill writes a value that the page cancels in beforeinput.

When the page calls preventDefault() in beforeinput, execCommand('insertText') inserts nothing and returns false. The fallback at L104-107 then sets the value directly and fires input. Thus an input mask or an editor that refuses a value still receives it in a test.

Input: a <textarea> and an <input> with the value original whose beforeinput handler calls preventDefault(), then locator('#t').fill('replace') and locator('#i').fill('replace').

value events
main original beforeinput only
this PR replace input only

Suggested fix: when the page cancels beforeinput, do not write the value. For example, record defaultPrevented from a beforeinput listener and skip setState when it is set.

}
const deadline = new Deadline(timeoutMs);
const target = session.refs.lookup(ref);
if (!session.refs.claimFresh(ref)) await stillLocated(session, target);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

P2: claimFresh skips the uniqueness check, so an action can go to the wrong element.

When no input occurs after locate, claimFresh returns true and stillLocated does not run. If the app adds a second match between locate and dispatch, the action goes to the first ref and does not fail.

Input: a page with one button.match. A held fetch makes the app prepend a second button.match after locate. Then engine.perform(ref, { kind: 'tap' }) on the first ref, through openHost and the engine contract. I ran it 2 times on each side.

result clicks
main NODE_STALE (2/2) none
this PR ok (2/2) ["first"]

The app must change the DOM in the one round trip between locate and dispatch, so I rate it P2. Suggested fix: run the uniqueness check also when the ref is fresh, or invalidate fresh refs on a DOM mutation of the scope.

@@ -0,0 +1,27 @@
/** The media type of a file by its extension: a fulfilled route's `content-type`, and an uploaded `File`'s `type`. */
export const CONTENT_TYPES: Readonly<Record<string, string>> = {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

P2: the extension table is too short for its two uses.

This table sets the content-type of route.fulfill({ path }) (network-decisions.ts:391) and the File.type of an upload on a provider's browser (actions.ts:629). Types that are not in the table get no header or an empty type. Playwright used a full MIME table.

Input 1: route.fulfill({ path }) for m.wasm, f.docx, f.xlsx, f.avif, then WebAssembly.instantiateStreaming(fetch('/files/m.wasm')).

.wasm content-type instantiateStreaming
main application/wasm ok
this PR none MIME type error

Input 2: setInputFiles with a.docx, a.xlsx, a.avif, a.wasm on a BrowserProvider browser (local Chrome over CDP), then read File.type.

File.type of all four
main the standard MIME types
this PR ""

.txt and .png are the same on both sides. Suggested fix: use a complete MIME table (for example the mime database, or a copy of Playwright's table).

return nested.name === 'not' ? !any : any;
};
const matchesCompound = (element: Element, step: CssStep): boolean => {
if (step.compound.includes(':scope') ? !isScope(element) : element === scope) return false;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

P2: :scope in an attribute value is read as the :scope pseudo-class.

step.compound.includes(':scope') is a substring test on the compound text. It also matches :scope in a quoted attribute value, so the compound then matches only the scope element.

Input: <div data-x=":scope"><b>hello</b></div>, then locator('[data-x=":scope"] > b').count().

count
main 1
this PR 0

Suggested fix: detect :scope from the tokens of the compound (outside strings and attribute groups), not from its text.

end = groupEnd(source, index);
tokens.push({ kind: 'group', text: source.slice(index, end) });
} else {
while (end < source.length && !SPECIAL.test(source[end]!)) end += 1;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

P2: a CSS comment in a selector gives INVALID_LOCATOR.

tokenizeSelector has no case for /* ... */. A comment becomes part of a text token, and the selector is then invalid. CSS allows comments anywhere whitespace is allowed, and Playwright accepts them.

Input: <article>art</article>, then locator('body /* x */ article').count().

result
main 1
this PR INVALID_LOCATOR

Suggested fix: tokenize /* ... */ as whitespace (outside strings).

type: (text) => run('keyboard.type', (session, { signal }) => typeInto(session, text, signal), { input: true }),
},
mouse: {
move: (x, y) => run('mouse.move', (session, { signal }) => session.input.send(moveSources(Math.round(x), Math.round(y)), signal), { input: true }),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

P3: mouse.move(NaN, …) and mouse.wheel(NaN, …) succeed.

Math.round(NaN) is NaN, and the input is sent without a check. On main the same calls fail.

mouse.move(NaN, 5) mouse.wheel(NaN, 5)
main ENGINE_FAILURE ENGINE_FAILURE
this PR ok ok

Suggested fix: reject non-finite coordinates and deltas with INVALID_ARGUMENT.

throw new ConfigurationError('INVALID_CONFIG', `smol: port ${app.port} is both app.port and in hostPorts; the browser's localhost:${app.port} can be only one of them`);
}
}
if (prepareTimeout !== undefined && (typeof prepareTimeout !== 'number' || !Number.isFinite(prepareTimeout) || prepareTimeout <= 0)) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

P3: smol() accepts a prepareTimeout that attachBrowser then refuses.

This check accepts any finite positive number. attachBrowser (packages/web/src/attach.ts:52) accepts only an integer from 1 to its maximum. Thus the config loads, and then each attempt fails.

prepareTimeout smol config attachBrowser
1000 ok ok
1.5, 0.5 ok INVALID_ARGUMENT
3e9 ok INVALID_ARGUMENT

This option is new, so I ran it on this branch only. Suggested fix: use the same rule as attachBrowser here, so the error occurs at config load.

"@e2e-dev/core": patch
---

A standalone session opened while a run is in progress, such as `attachBrowser()` inside a test, no longer hides the run's secrets while it is open or clears them when it closes. `app.resolveUrl` resolves an absolute URL on a target with no `app.url`; a relative one is still `APP_URL_REQUIRED`.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

P3: the changeset says more than the change does.

The text says that a standalone session opened during a run "no longer hides the run's secrets while it is open". This is true for a session with no secrets of its own. It is not true for a host that has its own secrets.

case, inside a run main this PR
open standalone hold with no secrets: run's secret SECRET_UNAVAILABLE bound
open launch() host with its own secrets: run's secret SECRET_UNAVAILABLE SECRET_UNAVAILABLE
after the host closes no registry bound

Suggested fix: say that only a session without secrets of its own leaves the run's secrets available, or make a host with secrets add to the run's registry instead of replacing it.

Comment thread docs/reference/web.mdx

| Throws | When |
| --- | --- |
| `UNSUPPORTED_CAPABILITY` | The browser comes from a browser provider without [`downloads`](/browser#downloads-on-the-provider). |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

P3: the docs say downloads without provider downloads throw, but they work.

With a local BrowserProvider that has no downloads, browser.waitForDownload saves the file (report.csv) on main and on this branch. These places still say UNSUPPORTED_CAPABILITY:

  • docs/reference/web.mdx:384
  • docs/reference/web.mdx:980 (this line)
  • skills/e2e/references/setup.md:219

Please make these lines agree with the behavior. I ran only a provider whose browser runs on the runner's machine; I did not run a remote browser. Please also check docs/integrations/testmu.mdx:246. I did not read it.

* sent, on a browser whose key events cannot.
*/
async typeAsWritten(characters: readonly string[], signal?: AbortSignal): Promise<boolean> {
if (!this.target.traits.cdp) return false;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

P3 (from reading the code, not run): on Firefox, typing with Shift held sends no key events.

Without CDP, typeAsWritten returns false. The text then goes in through execCommand, so keydown and keyup do not occur. On Chromium the key events occur. docs/reference/web.mdx:1006 says only that the text "still arrives as written", and the Firefox limits table does not list this.

I could not start Firefox on my machine, so I did not run this. Suggested fix: add this to the Firefox limits table, or send BiDi key actions for the characters that a key can enter.

@kdy1 kdy1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Note

This text was drafted with AI and posted after human approval.

  • Harness: T3 Code
  • AI agent: Claude Opus 5.5 (claude-opus-5-5), with 5 Claude Opus 5.5 subagents

I ran the deterministic suites of 14 open-source projects that use @e2e-dev/web on main (402a6157) and on this PR's head (9bc0c61b). Each project used the same packed e2e, @e2e-dev/core, and @e2e-dev/web tarballs from each build, on macOS with Node 26, and I reran every PR-only failure at least twice. Two tests that pass on main fail on this PR, and the changeset does not mention either one. Several documented breaks also need clearer wording or a migration path. The inline comments give the details (8 comments).

Requested changes

  1. A chained text query no longer matches the scope element itself. This breaks UniClipboard's relay-overview test. See the comment on packages/core/src/engine/resolve.ts.
  2. An attempt-scope BrowserProvider that returns an Electron cdpEndpoint still fails at app.open. My earlier comment listed this case in its table. The fix added connect: { context: 'existing' }, but this case is still not fixed. It breaks the pattern in coder/xum's tests/stories/electronProvider.ts. See the comment on packages/web/src/driver/browser-source.ts.
  3. The changeset, the INVALID_CONFIG messages, and the skill do not give the migration for :visible, reconnectEndpoint, and WebKit. Error text from the chromium-bidi mapper also reads [object Object].

One finding is in a file this PR does not change: docs/integrations/notte.mdx:80 still says that each attempt runs "in a fresh session's default context, on its first tab". On this PR, an attempt-scope lease opens a new tab (see item 2), so this sentence is no longer true.

Results

This table shows only the projects that I did not report in my earlier reviews. openbot, cezar, and quivr give the same results as in those reviews.

Project main PR
UniClipboard/UniClipboard (root suite) 2/2 1/2: relay-overview fails (item 1)
SakuraByteCore/codexmate 10/10 2/10: :visible is INVALID_LOCATOR (documented in screen.mdx, not in the changeset)
coder/xum (bugbash repros, 126 tests) 114 pass, 12 fail the same tests and errors
coder/xum Electron provider (repro with Electron 44) app.open passes ENGINE_FAILURE: browsingContext.create: unknown error: Not supported (item 2)
MarcosCamara01/ecommerce-template 23/23 23/23
wraps-team/wraps failures shared by both builds the same
SolZeroAI/solstatus, aranlucas/react-hook-form-mantine, e2e-inc/e2e-iframes, sjdonado/idonthavespotify, expo/examples with-e2e (web) pass pass

The context: 'existing' migration works well for openbot's pattern. In a reproduction of its setup (Electron 45, viewport: null, app.command with readyUrl), it is better than main, because one app launch now serves many tests and retries.

I did not run steps that call a model (no key), UniClipboard's WebView2 suite (Windows only), or openbot's live provider tests (they need sign-ins). I used local reproductions of the last two attach patterns.

const { rank } = treeIndex();
return candidates.filter((node) => matches.has(node)).toSorted((a, b) => (rank.get(a) ?? 0) - (rank.get(b) ?? 0));
}
case 'query': {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

A chained query searches only the strict descendants of its scope (descendantsOf), so getByTestId('x').getByText('…') no longer finds text that the x element holds itself. On main, Playwright resolved the chain, and Playwright's text query also matches the scope element. This changes behavior, and neither the changeset nor screen.mdx mentions it.

Found with UniClipboard/UniClipboard apps/gui-go/frontend/e2e/tester-army/relay-overview.e2e.mjs:98, applied().getByText('网络节点尚未启动', { exact: false }).waitFor(). It passes on main and fails on this PR, 2 of 2 runs:

LOCATOR_NOT_FOUND: locator did not become visible: getByTestId("relay-overview-applied") >> getByText("网络节点尚未启动")

Minimal repro (main: pass, PR: fail, 3 of 3 runs):

<p data-testid="applied">Node not started yet</p>
await screen.getByTestId('applied').getByText('Node not started').waitFor({ timeout: 3000 });
await screen.getByTestId('applied').getByText(/not started/).waitFor({ timeout: 3000 });

Text in a child element still matches on both builds. With .filter({ hasText }) at the three affected lines, the UniClipboard test passes on this PR.

Please match the scope element too for text queries, as main did. If the new behavior is intended, add it to the changeset as a break, with filter({ hasText }) as the replacement. (getByRole on the scope element itself fails on both builds, so this applies only to text.)

scope: leases.scope,
userContext: leases.scope === 'attempt'
? {
mode: 'default',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

My earlier comment on this file listed this case in its table (BrowserProvider with scope: 'attempt'). The fix added connect: { context: 'existing' }, but this case still fails at 9bc0c61b.

In attempt scope, a lease gets user context mode 'default'. session.ts adopts the browser's existing tab only in mode 'adopt-tab' (createContext, line 284), so openTab always sends browsingContext.create (line 325). Electron refuses that command. On main, Playwright used the leased browser's first page.

This breaks coder/xum's tests/stories/electronProvider.ts (xumElectron()). It starts one Electron per attempt with --remote-debugging-port=0 and returns { id, cdpEndpoint } from a scope: 'attempt' provider. With the same provider and Electron 44.10.0, a test that calls app.open('/') passes on main and fails on this PR, 3 of 3 runs:

ENGINE_FAILURE: navigation: browsingContext.create: unknown error: Not supported

The changeset's replacement, connect: { cdpEndpoint, context: 'existing' }, passes, but it does not fit this pattern. connect keeps one browser per worker and calls no release, so xum would lose its fresh Electron per attempt and the cleanup. BrowserLease has no context: 'existing' equivalent.

Please adopt the leased browser's existing tab in attempt scope (as main did, and as docs/integrations/notte.mdx:80 still says), or give BrowserLease an equivalent of context: 'existing'. If neither is done, add this to the changeset.


if (process.argv[1] !== undefined && import.meta.url === pathToFileURL(process.argv[1]).href) {
serve().catch((cause: unknown) => {
process.stderr.write(`${cause instanceof Error ? cause.message : String(cause)}\n`);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

chromium-bidi rejects with a plain { code, message } object, not an Error, so String(cause) writes [object Object] here and in the unhandledRejection handler at line 140. With a host that does not implement Target.getBrowserContexts (WebView2-like, simulated in a CDP proxy), both builds fail. main reports:

'Target.getBrowserContexts' wasn't found

This PR reports:

the chromium-bidi mapper exited (code 1): [object Object]

UniClipboard's webview2.mjs looks for the CDP method name in this text to decide that the host is unsupported, so with this message that check cannot work. Please serialize non-Error causes, for example their message field or JSON.stringify.

This has the same cause as my earlier setCookies comment: the mapper turns a CDP error object into a string. The fix for that comment replaces the [object Object] text in cookies.ts only (lines 58-63), so other paths still show it. If the error object is serialized where the mapper turns it into text, both cases are fixed, and the workaround in cookies.ts is not necessary.

if (!isPlainObject(connect)) {
throw new ConfigurationError('INVALID_CONFIG', `web({ connect }) must be a plain object: { cdpEndpoint, context? }, got ${kindOf(connect)}`);
}
rejectUnknownKeys('web({ connect })', connect, ['cdpEndpoint', 'context'] satisfies (keyof WebConnectOptions)[]);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

A config that still has reconnectEndpoint (nightly-labs/openbot scripts/provider-live/e2e.config.ts, UniClipboard apps/gui-go/e2e/tester-army-native/engine.mjs) gets:

INVALID_CONFIG: web({ connect }) has unknown key "reconnectEndpoint"; expected one of cdpEndpoint, context

The message does not say that the key was removed or what replaces it. Both projects use reconnectEndpoint only to attach to an Electron or WebView host, and for that context: 'existing' is the replacement. The removed video key (line 44) already names its replacement. Please give reconnectEndpoint the same kind of message, for example "reconnectEndpoint was removed; to drive the page an Electron or WebView host already shows, set context: 'existing'".

I checked the migration: in a reproduction of openbot's setup (Electron 45, viewport: null, app.command with readyUrl), the config with context: 'existing' typechecks and all tests pass, retries included.

- Lightpanda no longer works: with `lightpanda()` or `connect` to a Lightpanda server, a test that opens a page times out. Run those targets on `chromium`.
- Moli reads a page but cannot act on it: with `moli()` or `connect` to a Moli server, an action on an element fails with `ACTION_FAILED` or `LOCATOR_NOT_FOUND`, and a screenshot throws `ENGINE_FAILURE`. Run those tests on `chromium`.
- `surfaceOf` and `PlaywrightLiveSurface` are removed, so there is no raw Playwright `Page` or `BrowserContext` to reach for.
- `browser.locator` takes CSS and XPath, alone or in `>>` chains: no `text=`, `nth=`, or other Playwright engines. Chain `nth()` and screen queries instead.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

SakuraByteCore/codexmate builds its nav selectors with Playwright's :visible pseudo-class (tests/e2e-browser/web-ui.e2e.ts). 8 of its 10 tests pass on main and fail on this PR:

INVALID_LOCATOR: selector #side-tab-dashboard:visible, #tab-dashboard:visible is not a CSS or XPath selector

:visible is a pseudo-class, not an engine, so this line does not clearly cover it. screen.mdx:275 says that browser.locator has no :visible, but main's screen.mdx showed browser.locator('p:visible') as a form that works. Please name :visible here, and the other Playwright pseudo-classes (:has-text(), :text()), with the replacement.

The replacement also has a gap. screen.getByTestId(…, { visible: true }) works for codexmate's simple selectors (all 10 tests pass with it). But browser.locator takes no options and filter() has no visible, so a selector such as [data-nav][aria-current="page"]:visible (codexmate's activeNavItem) has no direct replacement.

- `surfaceOf` and `PlaywrightLiveSurface` are removed, so there is no raw Playwright `Page` or `BrowserContext` to reach for.
- `browser.locator` takes CSS and XPath, alone or in `>>` chains: no `text=`, `nth=`, or other Playwright engines. Chain `nth()` and screen queries instead.
- `getByRole('textbox')` finds a `contenteditable` host whatever its tag, and the tag's own role no longer does: `getByRole('heading')` does not find an `<h1 contenteditable>`. `getByRole` also finds a control with only an icon by its `title`. A query that matched one node before can now match two.
- `connect.reconnectEndpoint` and `BrowserLease.reconnectEndpoint` are removed, and `reconnectEndpoint` in `connect` is `INVALID_CONFIG`: a dropped connection fails the attempt, and the next attempt attaches again through `cdpEndpoint`. A host that cannot create a browser context, such as an Electron app, takes `connect: { cdpEndpoint, context: 'existing' }` instead: the test drives the page the host already shows.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Three points about this line, from the openbot and xum checks:

  • "the next attempt attaches again through cdpEndpoint": the drop error is retryable: false (driver/connection.ts:143), so retries does not run the failed test again. Only the next test attaches again. The sentence reads as if a retry would recover.
  • context: 'existing' refuses a host that shows two tabs (UNSUPPORTED_CAPABILITY: cannot tell which tab … 2 are open … 2 of them are visible). On main, the same Electron app with a second window passed, because the first page was used. web.mdx:365 documents the refusal, but this breaking-changes list does not. An Electron app with a helper window and no DevTools proxy breaks.
  • The Electron migration covers connect only. An attempt-scope BrowserProvider that returns an Electron endpoint now fails (see the comment on browser-source.ts).


**Breaking:** the web engine drives Chromium and Firefox over WebDriver BiDi and no longer uses Playwright. Tests, fixtures, and `web()` options stay the same, except:

- WebKit is gone: `web({ browser: 'webkit' })` is `INVALID_CONFIG`.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

open-mercato/cezar has configs where one target uses webkit and another uses chromium (e2e.manager-start.config.ts, e2e.build-reload.config.ts). On this PR the whole config is INVALID_CONFIG, so the Chromium target does not run either. Please say that one webkit target makes the whole config fail to load, so that users remove the target and not only expect it to be skipped. With webkit changed to chromium, manager-start passes 2/2 on this PR.

This is separate from the question in my previous review about a deprecation period for the WebKit removal. Whatever the answer to that question, this line should say what happens to the other targets in the config.

| `connect` | `{ cdpEndpoint }` attaches to a remote Chromium over CDP; `cdpEndpoint` is required, and both it and `reconnectEndpoint` are resolvers `(signal) => url` or `(signal) => ({ endpoint, headers })` for authenticated CDP connections, not strings, else `INVALID_CONFIG` at load. With `reconnectEndpoint` it rides one persistent default context, needs a fresh browser from `cdpEndpoint` every attempt, and reconnects only to the original browser and page. |
| `headers` | Sent to the app's origin only (scheme, host, and port of `app.url`; Vercel's `x-vercel-protection-bypass`, ngrok's `ngrok-skip-browser-warning`), `agent.act` included; `credentialOrigins: ['https://api.example.com']` adds exact origins for `headers` and `basicAuth`. A request keeps them through its redirects, to any origin. Disables the browser HTTP cache and service workers. |
| `basicAuth` | `{ username, password }` for a `401` challenge from the app's origin, or one `credentialOrigins` lists (a redirect to `www` or `https:` is another origin; WebKit answers any origin when one is on a default port or an IPv6 host); `password` may be `secrets.get('name')`, resolved per attempt and redacted like any secret, the base64 `Authorization` credential too. |
| `connect` | `{ cdpEndpoint }` attaches to a remote Chromium over CDP; `cdpEndpoint` is a resolver `(signal) => url`, or `(signal) => ({ endpoint, headers })` for an authenticated CDP connection, not a string, else `INVALID_CONFIG` at load. A dropped connection fails the attempt and is reacquired at the next one. |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The connect row does not mention context: 'existing', which is now the only way to drive an Electron or WebView host. Two of the projects I checked (openbot, UniClipboard) need it. docs/reference/web.mdx documents it, but agents that follow this skill will not find it. Please add { cdpEndpoint, context: 'existing' } to this row, with what it does (it drives the page the host already shows, one worker, and refuses when two tabs are visible).

@michal-e2e michal-e2e left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Note

Drafted with AI (T3 Code, Claude Code, Codex; Claude Opus 5.5, with GPT-6.2 Astra, GPT-6.2 Sol and Claude Fable 5.2 as second readers), checked and posted by me.

Reviewed at 9bc0c61b0 (merge base 9d240ac95, main). Main's tip was a2d036312 when I last checked.

@okwasniewski, @kdy1's two reviews and 23 open threads at this same commit are still open (I did not rerun them), and I do not repeat them. This review adds what they do not cover: the merge with main, the core peer floor, saved sessions, masking on a tab opened before attach, uploads over connect, a browser left running after a hangup, and a scroll test that passes without the change it tests.

Must fix

  • Merge with main. git merge-tree --write-tree a2d036312 9bc0c61b0 stops on 39 conflicts (32 content, 7 modify/delete); main's newest commit, #1953 (the desktop engine), added two. Five of them are files this PR deletes and main has changed since the merge base. A rebase that keeps this PR's side drops main's work there without a conflict marker:

    • #1919 adds blur to the engine contract (KNOWN_LOCATOR_ACTION_KINDS) and implements it in packages/web/src/actions.ts. The BiDi engine declares actions: LOCATOR_ACTION_KINDS and driver/actions.ts has no blur case, so locator.blur() on a web target stops working after the merge.
    • #1621 adds web({ chromiumSandbox }) (default true, false on Linux) and launches Chromium with its sandbox. The new launcher always passes '--no-sandbox', and chromiumSandbox appears nowhere in packages/web/src at this commit.
    • #1957 changes in-page/read-semantics.ts (presentational table and list roles), and #1976 names the engine handle types.
    • Release #1763 consumed .changeset/bump-deps-2026-11-14.md and .changeset/init-ci-workflow.md. This PR edits both, so keeping them would release those entries a second time.

    Neither #1919 nor #1621 is released yet, so keep both APIs rather than listing them as breaks. Rebase, port blur and chromiumSandbox to the BiDi driver, and drop the two consumed changesets. Add one test that runs locator.blur() through the new driver on Chromium and Firefox, and one that launches Chromium with chromiumSandbox: true on macOS.

  • Core peer floor. packages/web/package.json:68 declares "@e2e-dev/core": ">=0.23.2 <1". That range admits @e2e-dev/core@0.24.0, which is on npm and does not export createResolver or createTextMatching; I checked its packed dist/engine/index.js. in-page/readers.ts:9 imports both, so a project on core 0.24.0 that updates only @e2e-dev/web fails at import. Set the floor to the first core version that ships them. Main's tip already has ">=0.24.1 <1": take it in the rebase if 0.24.1 is the release that carries this PR, otherwise use the version that does.

  • Saved sessions from the current release no longer restore. See packages/web/src/driver/state.ts:173. Your changeset says "Tests, fixtures, and web() options stay the same, except:", and its list does not mention saved state. Meanwhile docs/core.mdx tells users how "to keep a state between program runs". I exported a state with saveState() and state.export({ key }) and restored the same bytes through launch(), one run each:

    Exported on Restored on Result
    merge base merge base cookie and localStorage restored
    this PR this PR cookie and localStorage restored
    merge base this PR APP_NOT_OPEN: unsupported state format playwright-storage-state@1

    The old format string is playwright-storage-state; the new one is bidi-storage-state. Fix it one of two ways:

    • Restore the old format (one way, untried: its cookies and per-origin localStorage look like they map onto the new shape).
    • Or add this bullet to .changeset/web-bidi-only.md, and a matching sentence to the saved-state section of docs/core.mdx:
    - A `SessionState` exported by an earlier `@e2e-dev/web` does not restore: `host.newSession({ state })` fails with `APP_NOT_OPEN` ("unsupported state format playwright-storage-state@1"). Sign in again and export a new state.
  • Masking on a tab that was open before attach. packages/web/src/in-page/mask.ts:185 leaves a password field uncovered when it sits in a closed shadow root that the page created before e2e attached:

    • Closed roots are found through the attachShadow hook the preload installs, so a root made earlier is in no record. attach-browser.test.ts:156 asserts exactly that for queries.
    • The mask and its check walk the same incomplete set of roots, so nothing reports the missed field: app.screenshot() returned normally with it uncovered.
    • How I ran it. Chrome for Testing 157 headless was started on a page with two red <input type=password>: one in the light DOM, one in a closed root. I then ran launch(web({ connect: { cdpEndpoint, context: 'existing' } })) and app.screenshot(), once. The light-DOM field came back black (masked). The closed-root field came back red (not masked). After app.open('/') in the same session, the preload ran and both came back black, so the gap is the document that was loaded before the attach.
    • Why it blocks. AGENTS.md requires masked pixels only when masking is proven, and failing closed when that cannot be enforced. connect: { context: 'existing' } and attachBrowser are new in this PR and are built to drive a page that is already loaded. The old driver found closed roots the same way, so an attempt-scope provider whose page loaded before the lease may have had this gap too; I did not run that.
    • To what. Fail closed on an adopted document. Until a navigation runs the preload in that document, withhold pixels and evidence screenshots (pixelsWithheld: 'MASKING_UNPROVEN', the reason core already has), and add the closed-root password field to the adopted-tab test with an assertion on that.
  • Uploads over connect to a browser on another machine. packages/web/src/driver/browser-source.ts:156 gives connect sources files: 'local'. setInputFiles then sends this machine's paths, and a remote browser cannot read them.

    • Main. It attached with Playwright's connectOverCDP without isLocal, which marks the browser as not collocated (_isBrowserCollocatedWithServer = false in playwright-core 1.65.1). Playwright then sent the files' bytes.
    • The changeset. It names the byte upload for "a browser provider's browser" only.
    • Evidence. Read on both sides; not run, since it needs a browser on another machine.
    • To what. Use files: 'remote' for a connect endpoint whose host is not loopback, or for every connect, as main effectively did. Add an upload test over connect beside tests/integration/chromium/provider-uploads.test.ts. attachBrowser and smol's prepare share this source.
  • A hangup leaves the browser running. packages/web/src/driver/browser-watchdog.ts:116 handles SIGTERM and SIGINT only.

    • Why the browser outlives it. The browser runs in its own process group, so a terminal hangup does not reach it.

    • What I ran. I started the built watchdog on Chrome for Testing 157 with stdin held open and sent it each signal:

      Signal Watchdog Chrome Profile directory
      SIGTERM exits killed removed
      SIGHUP exits still running left on disk
    • What a user hits. Closing the terminal or losing the SSH session mid-run leaves one headless Chrome per worker.

    • Main. It launched through Playwright with handleSIGINT and handleSIGTERM off and handleSIGHUP at its default, true (read in playwright-core 1.65.1, not run), so a hangup closed the browser.

    • To what. One line beside the other two:

    process.on('SIGHUP', kill);
  • The scroll test passes without the change. The test is packages/e2e/tests/integration/agent-scroll-settle.test.ts, "keeps paging a list that holds still while it loads its next page"; the code is at packages/core/src/agent/action-dispatcher.ts:619. Your changeset scroll-until-load-pause.md says the list "counts as ended only once the screen stays unchanged for a second as well as three pages".

    • What I ran. With main's action-dispatcher.ts put back on this commit, the test passes, 3 runs of 3 (load average about 7 to 10). I logged rest each time the branch at line 619 was reached: the test never reaches it, and across all 42 tests in the five scroll test files it was reached 3 times, with rest at -2231, -2233 and -2234 ms. Mutants on lines 619 to 623 and on changedAt also survive every e2e unit test and engine-contract.
    • Why. readScrolledPage (line 666, already on main) re-reads every page that has not moved for up to HELD_STILL_MS, one second. By the third still page more than a second has passed since changedAt, so rest is negative and the new wait does not run. The test's row arrives after 700 ms, inside the first beat, which main also waits.
    • To what. Either show a case main gets wrong (a list whose next page lands after the three beats and less than a second after the last change, if one exists) and test that, or drop the new code and the changeset.

Optional

  • packages/web/src/driver/network-decisions.ts:208: Basic auth answers by record.url ?? event.request.url.
    • record.url is the URL from beforeRequestSent (network-binding.ts:345), and continue() never updates it after route.continue({ url }) rewrites the request. The chromium-bidi mapper reports the rewritten URL on authRequired.
    • So on Chromium, a route that rewrites an app request to an unlisted origin answering 401 sends that origin the app's credentials. One that rewrites to an origin listed in credentialOrigins gets a 401 instead.
    • Playwright decided by the challenge's own origin. Read, not run.
    • Prefer event.request.url, or update record.url in continue().
  • packages/web/src/driver/user-context.ts:260: with connect: { context: 'existing' }, a target that grants a permission cleans up with Browser.resetPermissions({}). That clears every override in the host's default context, including ones the host set itself. Read, not run. One way: refuse permissions on a borrowed context with UNSUPPORTED_CAPABILITY, as clearState is refused there.
  • packages/core/src/run/fixtures.ts:576: NS_ERROR_UNKNOWN_HOST was added for Firefox's APP_UNREACHABLE, but no test names it. Removing it passes every e2e unit test and engine-contract. Add it to the it.each at engine-contract.test.ts:442, beside NS_ERROR_CONNECTION_REFUSED.
  • packages/web/tests/types/connection.ts lost its @ts-expect-error lines for CdpTarget headers. The types are still public (CdpTarget, BrowserProvider.cdpHeaders), so nothing pins them at compile time now. Put the lines back.

Verified

  • CI is green at this commit. I took check, test, the testbed on Chromium and Firefox, web (windows), the benchmarks and mobile from it, and did not rerun them.
  • I built the merge base and this commit in clean worktrees (macOS arm64, Node 26.13.1). Every run below is on those builds, one run each unless stated.
  • Saved-session restore across versions, masking on an adopted tab, and the watchdog signals: the tables above.
  • web({ browser: 'webkit' }) and connect.reconnectEndpoint are INVALID_CONFIG on this commit, as the changeset says. webkit was accepted on the merge base.
  • playwright-core is no longer a dependency of @e2e-dev/web. It remains in the lockfile only as notte-sdk's optional peer.
  • No wire schema or fixture changed (git diff 9d240ac95 9bc0c61b0 -- packages/e2e/schema is empty). format is a free string in session-v1 and session-state-v1, so the envelope stays valid; the break is the restore above.
  • Mutation testing, run with each mutant applied to 9bc0c61b0:
    • What was mutated. 16 places where this PR adds or changes a branch, a condition or a constant: those in secrets.ts, action-dispatcher.ts, observation.ts, locator/engine.ts, run/fixtures.ts and run/standalone.ts, plus three web places under a claim in the changeset or description.
    • Result. 19 mutants. 9 were killed by a failing assertion and 8 survived. I reran each survivor against the whole e2e unit project plus the scroll, contract and abort integration tests, at a load average of 7 to 25.
    • Survivors:
      • The new scroll wait's condition inverted, its "moved meanwhile" branch disabled (two forms), and changedAt never reset. These back the scroll finding above.
      • NS_ERROR_UNKNOWN_HOST removed (optional above).
      • The saved-state format check removed, so no test pins which formats restore. That belongs with the saved-session fix.
      • perMessageDeflate: false turned to true. The description says compression is off, and no test pins it.
      • The live-hold preference in secrets.ts, which this PR carries over from main unchanged.
    • Not counted. One mutant did not compile and was rewritten. Another, which makes resolveUrl require an app URL again, fails attach-browser.test.ts with that ConfigurationError rather than an assertion.
    • Not mutated. The driver and in-page code, which I did not read in full, and core/src/engine/resolve.ts and internal/text.ts. I read resolve.ts: it moves resolveExpression onto createResolver, and a scope still searches strict descendants as it did on main, so mobile's rules look unchanged.
    • Firefox. The web mutants ran on unit and Chromium integration tests only, because Firefox is not installed here.

Not run

  • Most of the driver (packages/web/src/driver/, 51 files, +11,082 lines) and of the in-page code (packages/web/src/in-page/, 17 files). I read the security paths (masking, secret fill, navigation, credentials, handshake headers) and sampled the rest; kdy1's threads cover much of that code.
  • Firefox by hand. The Firefox evidence is CI's.
  • The 1,177 removed check lines the packet lists, line by line. I traced which deleted files moved and spot-checked five behaviors (readStyle NODE_STALE, clearCookies refusals, focus loss NOT_ACTIONABLE, the handshake token kept out of errors, hidden frames). The rest is not traced.
  • Uploads over connect to a remote browser: needs a browser on another machine.
  • Which of the new tests fail under some mutant: not measured, since mutants cover 16 places only and the PR adds hundreds of tests.
  • The area scripts (hazards.sh, docs_impact.py) and a full pass of review-triage.md and MUSTHAVE.md: not run for this size; the public type diff (api-diff.sh, merge base against this commit) was run and matches the changeset (surfaceOf, PlaywrightLiveSurface, reconnectEndpoint removed; attachBrowser, connect.context added; the other web() options unchanged).
  • The benchmark table in the description: not rerun. pnpm bench:ab needs a quiet machine, and this one was loaded.

For the maintainer

  • Scope. Besides the driver, this PR carries seven other user-visible changes, each with its own changeset: attachBrowser, smol's prepare browser, the scroll-until pause, vision: 'only' waits, exact operation timeouts, standalone-session secrets, and cookies without app.url. Splitting them would make the rebase and the release notes easier to check.
  • smol imports the engine. @e2e-dev/smol now imports attachBrowser from @e2e-dev/web at runtime. AGENTS.md says an integration imports the engine's types only.
  • Lightpanda. @e2e-dev/lightpanda ships as a patch although it can no longer open a page. Deprecating it may say that better.
  • Questions still open. From the 2026-11-17 comment: were the breaks confirmed with the users who rely on WebKit, surfaceOf and reconnectEndpoint, and is a 66% slower Firefox cold launch acceptable? kdy1 also asked whether the WebKit removal needs the six-month deprecation in CONTRIBUTING.md.
  • Firefox testbed. The Firefox testbed job runs with --exclude-tag playwright, which leaves out the describe blocks tagged playwright in 32 test files (routes, downloads, frames, uploads, request continue and fulfill). The description's "Tests never skip a browser" does not cover those: the testbed skips them on Firefox.
  • Error code. A saved state the engine refuses reads APP_NOT_OPEN, because INVALID_STATE is translated to it. SESSION_MISMATCH is the documented code for a stored session that does not match.

@michal-e2e michal-e2e removed the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 21, 2026
okwasniewski added a commit that referenced this pull request Nov 21, 2026
…ots (#2007)

* fix(web): read content hidden under a closed details across shadow roots

isInClosedDetails walked up with closest('details'), which stops at a
shadow boundary, so a shadow tree under a closed <details>, or an element
slotted into one, read as visible and passed toBeVisible(). It now walks
the flat tree with flatParentOf, the change from #1503's f57eeb7. It
knows a <details> and its first <summary> by name and the HTML namespace,
so a <details> adopted from another frame still folds.

isSkippedContent stepped up with assignedSlot, which is null for a slot in
a closed root, so content slotted into a closed root under
content-visibility: hidden read as visible. It now steps with flatParentOf
too.

slotOf, which the visibility walk now asks for every light child of a
closed root's host, scanned every slot's assigned elements per element.
It now reads a closed root's HTML slots once per read into a map, by exact
slot name or, for a root that assigns by hand, by element.

Co-authored-by: Oskar Kwaśniewski <oskar@okwasniewski.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(web): fold and skip only what the browser hides, once per read

A closed <details> folds its body when its ::details-content computes
content-visibility: hidden, so a page whose CSS shows a closed body reads
visible; without that pseudo element the open attribute decides. Its
first HTML <summary> child is looked up once per read, so a wide
<details> is walked once instead of once per child.

content-visibility: hidden skips nothing on display: contents, an inline
element, a table row or row group, or ruby text, which checkVisibility()
reads as visible in Chromium. One predicate, skipsContents, answers that
for isSkippedContent, the tree walk and directTextOf, so a control that
reads visible is also in the agent's tree.

The e2e-shown, e2e-read and e2e-label selector engines read each
candidate in its own reader call. They now pass the reader one closed-slot
map for a synchronous selector operation and drop it in a microtask, so a
locator reads a closed root's slots once per operation, not per match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(web): drop the selector-operation slot cache, read slots plainly

The e2e-shown, e2e-read and e2e-label selector engines are back to main:
they no longer share a closed-slot map across the reads of one selector
operation, which only paid off on contrived pages. Within one read,
slotOf now maps each element a closed root's HTML slots hold to its slot
from assignedElements, the browser's own assignment, instead of
reimplementing named assignment. Comments are shorter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(web): skip content only where the box skips it, and find closed slots by name

content-visibility: hidden skips nothing on a table, an inline table,
ruby, or an inline list item, as Chromium paints them, and a closed
<details> body laid out with ::details-content { display: contents }
renders, so both read visible. An HTML <button> or <fieldset> makes a box
of its own whatever its display, short of display: contents, so content
under one reads hidden. In SVG only an outermost <svg> has a box for the
property to act on: it skips whatever its display, and other SVG
elements, a nested <svg> included, ignore it.

In a closed root that assigns by name, slotOf finds an element's slot
from its slot attribute, the first HTML slot of that name, both read
outside any namespace, so a locator's read of one match never lists what
the slots hold. A root that assigns by hand still reads assignedElements().

isInClosedDetails asks whether a <details> folds its body before looking
for its summary, so an open one never looks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: michal-e2e <357875193+michal-e2e@users.noreply.github.com>
Co-authored-by: Oskar Kwaśniewski <oskar@okwasniewski.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@oconnorjoseph

Copy link
Copy Markdown

A data point for the open question about who depends on surfaceOf.

We use it from test-support code to collect V8 precise coverage per test. Each attempt gets its page through surfaceOf(engine).page() and opens context.newCDPSession(page). It calls Profiler.startPreciseCoverage({ callCount: true }), then takes Profiler.takePreciseCoverage on an interval, before each navigation and at the end. It fetches each module's source on Debugger.scriptParsed with Debugger.getScriptSource. The result is a per-test map of the source that ran, which a changed-files test selector reads. That is the use case #535 describes. We reach the raw page the same way for CDP screencast frames, a mid-test user-agent override, and standing request and console listeners.

As of 9bc0c61 there is no public route to a CDP session on the attempt's target. surfaceOf and PlaywrightLiveSurface are removed, and the "Driving the page yourself" section of docs/executors.mdx goes with them, so the documented executor seam has no replacement either. The driver already holds what is needed internally (ChromiumCdp over goog:cdp), so either of these would cover it:

If neither is planned, could the changeset or docs/reference/web.mdx name the supported workaround? One candidate is connect: { cdpEndpoint } to a browser the user launches, with the user's own CDP client attached to the same target. It would help to know whether a second CDP client beside the chromium-bidi mapper is something you expect to keep working.

Written with Claude Code on this account owner's behalf.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e team Opened by the e2e team size:XXL 1,000+ changed lines, not counting tests, fixtures, translated docs, or the lockfile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants