Browser Engines
Webrain drives four engines through one CDP backend. Picking the right one is the difference between a 12-second page load and a 2-second one — or between a working click and a silent no-op.Engine capability matrix
What still requires real Chrome: interactive Material/Google widgets
(dropdowns, calendars, segmented controls), interactive anti-bot challenges,
and rendering edge cases beyond Obscura v0.2.0’s parity. Obscura render
builds (default) now screenshot + PDF natively; no-render builds and
lightpanda have no paint engine (lightpanda’s screenshot is a silent
placeholder), and
webrain_scrape is a plain HTTP GET.
Authenticated / protected workflows also need a persistent profile +
session on real Chrome — see Browser Profiles and
Browser Sessions.
Fallbacks to expect: webrain_batch auto-detects lightpanda’s single
context and runs URLs sequentially on one reused tab (same tool call, same
schema — just no intra-call parallelism). Obscura’s AX map has no option
arm, so role="option" resolves as generic — drop the role filter and use
filter on the label. If an a11y tree comes back empty, the page never
rendered (consent/challenge gate) — check challenge and try real Chrome.
Getting each engine
To route a specific batch to real Chrome (e.g. for interactive SPAs), pass the
CDP endpoint directly:
lightpanda vs obscura for batches
- obscura opens N parallel tabs —
concurrencyis real overlap. - lightpanda
serveholds ONE browser context; a 2ndTarget.createTargeterrorsTargetAlreadyLoaded, sowebrain_batchdetects it and runs all URLs sequentially on one reused tab. Same tool call, same schema — just no intra-call parallelism. Pick obscura for large parallel crawls, lightpanda for footprint/velocity per page.
a11y notes
Google/Material widgets are often notbutton: dropdowns are combobox,
menu items option, segmented controls radio/tab. If role=<x> returns
[], drop the role filter and filter on the visible label text instead
(filter matches name, value, or css_path, case-insensitive). If the whole tree
is empty, the page never rendered — check challenge/consent.
