feat(notte): add @e2e-dev/notte, a browser provider for Notte cloud browsers

Merged
AN
8d ago
+1383-17

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 a BrowserProvider for @e2e-dev/web. Its options are Notte's start-session body, and notte-sdk is a peer (>=1.10.0, checked against 1.10.0 and 1.10.9).
  • Scope is always attempt. A Notte session refuses Target.createBrowserContext, so worker scope 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.read finds the file by that name.
  • One small engine change in @e2e-dev/web, additive: BrowserDownloadContext gets an optional suggestedFilename, passed from download.suggestedFilename(). The change has its own changeset, a docs line in browser.mdx, and an assertion in provider-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_url falls back to the session's debugInfo, as the SDK's own Session does.
  • 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. sweep stops 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-bearing viewer_url is never logged.
  • apps/testbed/e2e.notte.config.ts and test:notte run 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-mode filter: 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:

CauseTestsNotes
The test opens 127.0.0.1 / localhost directly79A 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-side7confirm → false, prompt → null before page.on('dialog') can act. Documented.
Keyboard shortcuts from a macOS runner7The 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 chooser2Notte blocks DOM.setFileInputFiles. Files up to 50 MB upload fine.
Remote-latency timing4waitForResponse, 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: 1920 with viewport: null: the page is 1920×1080.
  • kill -9 on a worker: without sweep, Notte reported the session closed/idle_timeout 3 minutes later. With sweep, the run printed released 1 browser(s) a worker left open and stopped it at once.
  • Fresh npm install of the packed tarball with published e2e@0.23.0, @e2e-dev/web@0.15.5, and notte-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