When browser automation fails or behaves unexpectedly.
Scanned 5/31/2026
Install via CLI
openskills install tools-only/X-Skills# Debugging
When browser automation fails or behaves unexpectedly.
## Headed Mode
Show visible browser window to see what's happening:
```bash
agent-browser --headed open example.com
agent-browser --headed snapshot -i
agent-browser --headed click @e1
```
## Console & Errors
View browser console output and page errors:
```bash
agent-browser console # View console messages
agent-browser console --clear # Clear console log
agent-browser errors # View page errors
agent-browser errors --clear # Clear error log
```
## Highlight Elements
Visually identify elements (use with `--headed`):
```bash
agent-browser highlight @e1
agent-browser highlight "#selector"
```
## Traces
Record browser traces for detailed debugging:
```bash
agent-browser trace start # Start recording
# ... do interactions ...
agent-browser trace stop trace.zip # Save trace file
```
Open traces in Playwright Trace Viewer: `npx playwright show-trace trace.zip`
## State Checks
Verify element state before interacting:
```bash
agent-browser is visible @e1 # Returns true/false
agent-browser is enabled @e1 # Check if interactive
agent-browser is checked @e1 # Checkbox state
```
With JSON output:
```bash
agent-browser is visible @e1 --json
# {"success":true,"data":true}
```
## Common Issues
### Element not found
- Re-snapshot: DOM may have changed
- Check visibility: `is visible @e1`
- Try `--headed` to see actual page state
### Click does nothing
- Element may be covered: try `scrollintoview @e1` first
- Element may be disabled: check `is enabled @e1`
- SPA not ready: add `wait --load networkidle`
### Form not submitting
- Check for validation errors in snapshot
- Some forms need `press Enter` instead of button click
- Wait for network: `wait --load networkidle`
### Auth redirect loops
- Save state after successful login: `state save auth.json`
- Check cookies: `cookies`
- Verify URL pattern: `get url`
## Debug Output
Add `--debug` for verbose output:
```bash
agent-browser --debug open example.com
agent-browser --debug click @e1
```
No comments yet. Be the first to comment!
Practical guide to testing web applications with screen readers for comprehensive accessibility validation.
克劳德代码会话的正式评估框架,实施评估驱动开发(EDD)原则
Go测试模式包括表格驱动测试、子测试、基准测试、模糊测试和测试覆盖率。遵循TDD方法论,采用地道的Go实践。
使用pytest、TDD方法、夹具、模拟、参数化和覆盖率要求的Python测试策略。
在编写新功能、修复错误或重构代码时使用此技能。强制执行测试驱动开发,包含单元测试、集成测试和端到端测试,覆盖率超过80%。