Browser Operate
Operate a browser for web automation. Supports local Playwright or AWS AgentCore. Includes launch, navigate, screenshot, click, fill, extract, info, closePage, exit, waitForNavigation, sleep/wait, and composite open (launch+navigate+info/extract/screenshot) or sequence (multi-step in one call).
🎯 RECOMMENDED PATTERNS:
1. **First-time access (no sessionId)**: Use `open` action - it auto-creates session + navigates + extracts
Example: {action:'open',url:'...',wantContent:true}
2. **Existing session**: Use `sequence` for multi-step operations or single actions
Example: {sessionId:'xxx',action:'sequence',steps:[{action:'navigate',url:'...'},{action:'wait',ms:3000},{action:'extract'}]}
⚠️ CRITICAL: DO NOT invent selectors! Use this workflow:
1. Navigate to page + wait 2-5s
2. Extract full page content (no selector) to see actual DOM structure
3. Use AI analysis to find real selectors from extracted content
4. Then perform targeted extraction/interaction
BEST PRACTICES:
1. First visit: use `open` action with wantContent:true to get page structure in one call
2. Use broad selectors (main, article, #content) - auto fallback if not found
3. For specific data: first get page content, then extract with real selectors
4. Batch related actions in sequence to minimize steps
5. Set reasonable timeouts (10-30s)
✅ CORRECT workflow:
First visit: {action:'open',url:'...',wantContent:true}
Analyze extracted content to find real selectors
Follow-up: {sessionId:'xxx',action:'extract',selector:'<real-selector-from-step1>'}
❌ WRONG workflow:
BAD: {action:'sequence',steps:[{action:'navigate',url:'...'},{action:'extract',selector:'invented-selector'}]} ← Will fail!
FEATURES: Graceful error handling (selector not found = fallback to page content), configurable timeouts, automatic retries.