Browser Testing with cmux browser
Test websites and frontend tools using cmux browser.
First Step
Run the help command to discover all available commands:
cmux browser --help
Determining the Target URL
Use the URL appropriate for the current context:
- Local dev server: Check the project for its dev server port (commonly
http://127.0.0.1:8000or similar) - Remote site: Use the URL provided by the user or documented in the project
Key Context
cmux browser open <url>returns a surface handle (e.g.surface:14) — use it for all subsequent commands- Element refs (e.g.
e9,e18) come fromsnapshot --interactiveand change after page mutations — always re-snapshot before interacting - When
click ref=eNNfails with JS errors, fall back toeval "document.querySelector('...').click()" - For large text input, use
evalwith JS instead offill/type