feat(notte): add @e2e-dev/notte, a browser provider for Notte cloud browsers
Adds @e2e-dev/notte, an official integration for Notte cloud browsers, as discussed with the e2e team. Notte maintains it.
web({ browser: notte({ solve_captchas: true }) })
notte()is aBrowserProviderfor@e2e-dev/web. Its options are Notte's start-session body, andnotte-sdkis a peer (>=1.10.0, checked against 1.10.0 and 1.10.9).- Scope is always
attempt. A Notte session refusesTarget.createBrowserContext, soworkerscope fails on its first test. - Downloads. Notte saves every download to the session's file storage, under the site's suggested filename rather than the download id.
downloads.readfinds the file by that name. - One small engine change in
@e2e-dev/web, additive:BrowserDownloadContextgets an optionalsuggestedFilename, passed fromdownload.suggestedFilename(). The change has its own changeset, a docs line inbrowser.mdx, and an assertion inprovider-downloads.test.ts. With an older engine, the provider falls back to the oldest file it hasn't read yet. - A start response without
cdp_urlfalls back to the session'sdebugInfo, as the SDK's ownSessiondoes. - Sweep. Notte sessions have no tags to find a run's sessions by. Instead, each worker writes a marker file per session under the system temp directory (
src/ledger.ts) and removes it on release.sweepstops whatever markers remain, so a session left by a crashed worker is stopped when the run ends rather than after Notte's 3-minute idle timeout. - Progress line:
session <id>, watch at https://console.notte.cc/sessions/<id>. The console link needs a sign-in. The token-bearingviewer_urlis never logged. apps/testbed/e2e.notte.config.tsandtest:notterun the testbed on Notte through a tunnel to the playground, like the Lightpanda config.- The logo (
docs/images/integrations/notte.svg) is near-black, so the site needs a dark-modefilter: invert(1)rule for it, like Expo's.
Verified
Ran it locally: yes, with the built CLI and a real NOTTE_API_KEY.
Testbed on Notte: 45 files and 582 tests, through a Cloudflare tunnel to the playground. 435 passed on Notte. For comparison, the same suite on a local Chrome leased per attempt through the same tunnel passed 523, and its 58 failures come from the tunnel and attempt scope. 102 tests fail only on Notte:
| Cause | Tests | Notes |
|---|---|---|
The test opens 127.0.0.1 / localhost directly | 79 | A cloud browser can't reach the runner's loopback, which is the same for any hosted provider. This includes the 7 download tests that fetch from 127.0.0.1. Every download served from the tunnel passes. |
| Notte answers JS dialogs server-side | 7 | confirm → false, prompt → null before page.on('dialog') can act. Documented. |
| Keyboard shortcuts from a macOS runner | 7 | The browser takes Windows combos. ControlOrMeta resolves to Meta on a Mac runner. Documented. |
| Subpixel scroll offsets (~0.001px) | 3 | |
| Folder upload, and the error text for a missing file chooser | 2 | Notte blocks DOM.setFileInputFiles. Files up to 50 MB upload fine. |
| Remote-latency timing | 4 | waitForResponse, selectOption actionability, frame detach, 307 redirect |
Scenarios, each followed by a check that Notte had no active sessions left:
- Retries: each attempt gets its own session.
- Test timeout: the session is released.
- Ctrl-C mid-run: exit 130, and the session is stopped.
- Video (
--video=on): the engine screencast works. - Ten parallel workers: all pass.
viewport_width: 1920withviewport: null: the page is 1920×1080.kill -9on a worker: withoutsweep, Notte reported the sessionclosed/idle_timeout3 minutes later. Withsweep, the run printedreleased 1 browser(s) a worker left openand stopped it at once.- Fresh npm install of the packed tarball with published
e2e@0.23.0,@e2e-dev/web@0.15.5, andnotte-sdk: the tests run.
Not verified: agent steps (agent.act / assert). There was no model key on the machine I ran this from. They drive the same CDP page as the deterministic tests.
pnpm check passes.
🤖 Generated with Claude Code