FoxIR v1.0.16
FoxIR v1.0.16
One commit on top of v1.0.15, all of it in the built-in browser (browser_cdp).
Snapshot indices now die when the page moves
snapshot numbers the clickable elements of the page; click / type_text can address them by
that number instead of guessing a CSS selector (CSS cannot express "the link whose text is 设置").
Numbers were only good until the page changed — and an out-of-date number often still resolves,
it just points at a different element. Measured on the real machine: inserting two buttons moved
the DOM from 9 to 11 nodes, and the old index 0 clicked "新按钮 0" and reported success.
Now every index-based action compares the live DOM node count against the stamp taken at
snapshot time and refuses with an explicit instruction to re-snapshot. An explicit CSS handle
([data-fx="0"]) still works after invalidation — that is a selector you wrote down, not a number
you assume is still valid.
The browser left behind by a launcher handoff is adopted in visible-window mode
msedge.exe hands its work off to an already-running browser and exits 0. The surviving browser
stays alive, keeps the profile locked, and answers CDP — but chromiumoxide's pipe transport only
saw the exited launcher, so from then on every launch failed the same way. That is the state
behind "内置浏览器起不来" on machines that use the visible-window mode for logging in.
The guard for adopting such a leftover used to be "it has zero pages". That is wrong: the handoff
launch itself wakes the empty shell up (measured: 147 ms → 0 pages, 479 ms → edge://newtab/,
584 ms → plus a sync-confirmation dialog that closes itself after ~2.6 s), so counting pages read
our own leftover as "a human is using this". The condition is now the page URL: browser startup
pages are adoptable, any page with real content is left alone.
Verification
- 18 real-browser regression tests (
cargo test --lib -- --ignored) pass against installed Edge. cargo test --lib: 377 passed; the 2 failures are the pre-existing tests that assert against
this machine's realC:\Windows\Prefetchand Recent folders.
Asset: FoxIR-v1.0.16-win64.zip, containing a single FoxIR.exe (the UI is embedded at compile
time; no other files are needed). Windows x64.