114 lines
4.7 KiB
Markdown
114 lines
4.7 KiB
Markdown
|
|
# Agent Browser Validation
|
||
|
|
|
||
|
|
- Date: 2026-03-24
|
||
|
|
- Tool: `agent-browser 0.22.0`
|
||
|
|
- Scope: verify whether newly installed `agent-browser` can extend current `frontend/admin` E2E closure beyond the existing Playwright CDP path
|
||
|
|
|
||
|
|
## Validation Goal
|
||
|
|
|
||
|
|
Determine whether `agent-browser` can:
|
||
|
|
|
||
|
|
- act as a stable browser automation path in the current constrained Windows environment
|
||
|
|
- close any remaining OS-level validation gap
|
||
|
|
- be promoted to a supported project E2E entrypoint
|
||
|
|
|
||
|
|
## Environment Findings
|
||
|
|
|
||
|
|
- PowerShell wrapper entrypoint `agent-browser.ps1` is blocked by execution policy in the current environment.
|
||
|
|
- The native binary is callable directly:
|
||
|
|
- `C:\Users\Admin\AppData\Roaming\npm\node_modules\agent-browser\bin\agent-browser-win32-x64.exe`
|
||
|
|
- `agent-browser` requires its daemon socket directory to be redirected to a writable root:
|
||
|
|
- `AGENT_BROWSER_SOCKET_DIR=C:\Users\Admin\.codex\memories\agent-browser-home\socket`
|
||
|
|
- Official browser bootstrap path was also tested:
|
||
|
|
- `agent-browser install`
|
||
|
|
- result: failed to fetch Chrome for Testing version metadata from `googlechromelabs.github.io`
|
||
|
|
- conclusion: the official first-run install path is not currently closed in this environment
|
||
|
|
|
||
|
|
## Execution Paths Tested
|
||
|
|
|
||
|
|
### 1. Native launch mode
|
||
|
|
|
||
|
|
Tested with:
|
||
|
|
|
||
|
|
- `--executable-path C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe`
|
||
|
|
- `--executable-path C:\Users\Admin\AppData\Local\ms-playwright\chromium-1208\chrome-win64\chrome.exe`
|
||
|
|
- crash-dialog / crashpad suppression args aligned with the existing stable browser wrapper:
|
||
|
|
- `--noerrdialogs`
|
||
|
|
- `--disable-breakpad`
|
||
|
|
- `--disable-crash-reporter`
|
||
|
|
- `--disable-crashpad-for-testing`
|
||
|
|
- `--no-sandbox`
|
||
|
|
- `--disable-dev-shm-usage`
|
||
|
|
- `--headless=new`
|
||
|
|
|
||
|
|
Result:
|
||
|
|
|
||
|
|
- failed before DevTools became ready
|
||
|
|
- representative error:
|
||
|
|
- `Chrome exited early ... without writing DevToolsActivePort`
|
||
|
|
- crashpad / mojo access-denied errors were still present
|
||
|
|
- the failure reproduced both with system Edge and with Playwright cached Chromium `chrome.exe`
|
||
|
|
|
||
|
|
Conclusion:
|
||
|
|
|
||
|
|
- `agent-browser` launch mode is not currently usable as a stable browser launcher in this environment
|
||
|
|
|
||
|
|
### 2. External CDP connect mode
|
||
|
|
|
||
|
|
Tested by connecting `agent-browser` to the already stabilized external browser path started by [`frontend/admin/scripts/run-cdp-smoke.ps1`](/D:/project/frontend/admin/scripts/run-cdp-smoke.ps1).
|
||
|
|
|
||
|
|
Result:
|
||
|
|
|
||
|
|
- stable for observation steps:
|
||
|
|
- `open`
|
||
|
|
- `wait --load networkidle`
|
||
|
|
- `snapshot -i`
|
||
|
|
- `get text`
|
||
|
|
- successful snapshot captured interactive refs on `/login`, including:
|
||
|
|
- username textbox `@e7`
|
||
|
|
- password textbox `@e8`
|
||
|
|
- login button `@e6`
|
||
|
|
- partially usable for limited in-page actions:
|
||
|
|
- `focus @e7`: succeeded
|
||
|
|
- `eval` against the page context: succeeded for DOM value injection
|
||
|
|
- not stable for user-like interaction steps:
|
||
|
|
- `fill` timed out repeatedly after successful snapshot
|
||
|
|
- `type @e7 e2e_admin`: failed with read timeout / host not responding
|
||
|
|
- `keyboard inserttext e2e_admin`: failed with `CDP error (Input.dispatchKeyEvent): Invalid 'text' parameter`
|
||
|
|
- `click @e6` after successful `eval`-based field population: failed with read timeout / host not responding
|
||
|
|
- `eval`-triggered DOM `submit.click()` returned successfully, but the subsequent `wait --url **/dashboard` still failed with read timeout / host not responding
|
||
|
|
|
||
|
|
Representative result:
|
||
|
|
|
||
|
|
- `open http://127.0.0.1:3000/login`: success
|
||
|
|
- `snapshot -i`: success
|
||
|
|
- `get text @e2`: success
|
||
|
|
- `focus @e7`: success
|
||
|
|
- `eval` to set username: success
|
||
|
|
- `fill @e7 e2e_admin`: failed with read timeout / host not responding
|
||
|
|
- `type @e7 e2e_admin`: failed with read timeout / host not responding
|
||
|
|
- `keyboard inserttext e2e_admin`: failed with invalid CDP parameter
|
||
|
|
- `click @e6`: failed with read timeout / host not responding
|
||
|
|
- DOM-triggered login + `wait --url **/dashboard`: failed with read timeout / host not responding
|
||
|
|
|
||
|
|
Conclusion:
|
||
|
|
|
||
|
|
- in the current environment, `agent-browser` connect mode is usable for observational inspection and limited in-page diagnostics
|
||
|
|
- it is not reliable for user-like interactive E2E execution or workflow progression
|
||
|
|
|
||
|
|
## Real Conclusion
|
||
|
|
|
||
|
|
- Installing `agent-browser` does not currently close the remaining OS-level validation gap.
|
||
|
|
- It does not replace the existing supported E2E path.
|
||
|
|
- Current supported browser-level E2E path remains:
|
||
|
|
- Playwright library
|
||
|
|
- external browser launch
|
||
|
|
- CDP connection
|
||
|
|
- [`npm.cmd run e2e:full:win`](/D:/project/frontend/admin/package.json)
|
||
|
|
- `agent-browser` is currently best described as:
|
||
|
|
- installed
|
||
|
|
- partially usable for read-only browser inspection plus limited DOM-assisted diagnostics
|
||
|
|
- not yet a supported interactive E2E runner
|
||
|
|
- not evidence of full OS-level automation closure
|
||
|
|
- not capable of supporting full simulated user-operation or OS-level validation in the current environment
|