Obscura and Moli
Two more CDP server engines.
Two more experimental headless engines that are their own CDP server, like
Lightpanda: navigera starts each as <engine> serve on a free port.
Unlike Lightpanda they open tabs and contexts and lay pages out, so they
take Chrome’s paths; each session gets a browser of its own.
--engine obscura(experimental; tested on Obscura 0.2.7, its newest stable release) startsobscura serve --allow-private-network: Obscura refuses loopback and private addresses otherwise, and a local dev server is what agents test. The binary comes from$OBSCURA_BINorPATH, or from--chromium. Tabs, contexts, layout and screenshots work as on Chrome. Differences:- popups: a page opened with
target=_blankloads in the current tab (Obscura opens no target for it);tab-newworks. - dialogs: Obscura’s own
alert,confirmandpromptanswer at once and raise no event (confirm()false,prompt()null). navigera puts its own in each tab’s documents: they answer asdialogsays and each dialog is reported as on Chrome. A page’s script sees them as plain functions; they are checked in the top document only, not in frames. - input during a navigation the page started (a script or a form): a key or click sent meanwhile answers only once the new document has loaded (Obscura #921): 1.5 s for a document that takes 1.5 s, where Chrome answers in under 3 ms.
- shadow roots: its mouse events go to
document.elementFromPoint, the shadow host, so a press never reaches an element inside a shadow root. navigera asks each engine it starts as a CDP server once, with a button in a shadow root on its first tab; where the press stops at the host, aclickon an element inside one gets its pointer and mouse events from the page (composed, so the host’s listeners hear them too) once the usual checks passed. A page that checksisTrustedsees them as false. - its accessibility tree’s root has no name and no URL, and
Accessibility.getRootAXNodeanswers nothing:axreads the whole tree and takes the title and URL from the page. - its accessibility tree is the top document’s light DOM only: no
shadow root’s content and no frame’s document. navigera asks each
engine it starts as a CDP server once whether an open shadow root’s
button is in its tree; where it is not,
axlists what open shadow roots and same-origin frames hold after the tree, under- shadow root of <tag>and- document of <iframe> "<title>", without refs (target those elements with--text). - a multiple
<select>takes one option (select --addis refused), and there is noClipboardAPI. eval: Obscura runs a script it is asked to check for side effects, so navigera can’t tell a read from a change there and runs everyevalas an action (the page’s change watch armed first), never as a read.
- popups: a page opened with
--engine moli(experimental; tested on Moli 1.1.27) startsmoli serve --layout: without--layoutMoli answers geometry from a fixed compatibility layout and paints nothing. The binary comes from$MOLI_BINorPATH, or from--chromium. Tabs, popups (as tabs), dialogs and screenshots work as on Chrome. Differences:- layout: Moli builds it at the first geometry read and keeps it until a
screenshot, so an element a script adds afterwards has no box and no
innerTextthere. navigera takes a 1x1 screenshot before it reads boxes or text (an element op,text,ax,eval, each 100 ms of await) when a document (the page’s or a same-origin frame’s), its DOM, its scroll or its viewport changed since the last one: a whole layout, 1.7 ms on a small page, 157 ms on 4,500 nodes. Changes inside a shadow root aren’t counted, and anevalthat changes the page and then reads a box reads the layout from before its change. - refs are Moli’s node ids, large numbers (
[ref=2000000017]). - a
<select>’s value inaxis the selected option’s value, not its label. - roles in
ax: a file input isfilewhere Chrome saysbutton, and a<details>summary’s toggle isbuttonwhere Chrome saysDisclosureTriangle.
- layout: Moli builds it at the first geometry read and keeps it until a
screenshot, so an element a script adds afterwards has no box and no
Made from docs/navigera.md.