Auto-Detection Mode
Auto-Detection mode is a powerful feature of Auto-Browse that automatically manages page contexts and browser state, making it easier to write and maintain automation scripts.Overview
When using Auto-Browse, you don’t need to explicitly manage page contexts. The library will:- Detect the current page context automatically
- Create new browser instances when needed
- Handle page lifecycle management
- Clean up resources properly
Basic Usage
The simplest way to use Auto-Browse is to let it handle context management:How It Works
-
Browser Management
- Creates browser instance when needed
- Reuses existing browser when possible
- Handles cleanup automatically
-
Page Context
- Detects active page context
- Creates new pages when required
- Manages multiple pages efficiently
-
State Management
- Tracks page state automatically
- Handles navigation events
- Maintains context between commands
Integration Example
Auto-Browse works seamlessly with both standalone and Playwright modes:Key Benefits
- Automatic Context Management: No need to manually create or manage browser/page instances
- State Tracking: Maintains context between commands automatically
- Multi-Page Support: Handles tabs, popups, and navigation seamlessly
- Error Handling: Cleans up resources automatically on errors
Next Steps
- Explore Supported Actions
- Learn about Best Practices
- Check out Error Handling