- Run a hard recovery benchmark that deliberately induces wrong focus, then compare
App.switchagainst a visible taskbar fallback.
- Observed
Settingsas the foreground window. - Induced wrong focus with one taskbar click on Chrome.
- Verified Chrome foreground.
- Attempted semantic recovery with
App.switch("Notepad"). - Re-observed after the failure.
- Recovered with one taskbar click on the visible Notepad button.
- Typed a marker into Notepad and re-observed.
- pass
- Chrome became the foreground window as expected.
- fail closed
App.switch("Notepad")returned a failure message- the next snapshot still showed Chrome foreground
- pass
- one taskbar click on the visible Notepad button restored Notepad foreground
- pass
Type(loc="500,400", text=" rf")succeeded- Notepad advanced from
30 个字符to33 个字符
- Focus recovery should be treated as a layered problem, not a single primitive:
App.switchis useful but not sufficient in every browser-to-desktop state- a verified taskbar fallback is stronger when the snapshot already exposes the target button