🐍 Looking for Stagehand in Python?Switch to v2 →
Many modern web applications open new tabs when users click certain buttons or links. Without proper multitab support, automation scripts break when expected content appears in a new tab rather than the current one. Stagehand’s multitab capabilities ensure your automations work seamlessly across multitab workflows.
The Stagehand Page
Stagehand automatically adapts to multitab workflows. The active page (accessed viacontext.activePage()) always points to the most recently opened or active tab, ensuring your automations continue working even when new tabs are created.
This means you can continue using familiar patterns:
Manual Page Management
For more control or multitab workflows, you can manage multiple tabs explicitly:Next Steps
Orchestrate complex workflows with Agent
Use
Agent to autonomously execute multi-step tasks and complex workflows.Working with iframes
Learn best practices for interacting with elements inside iframes.
Browser Configuration
Manage browser contexts and sessions for complex automation scenarios.
Logging & Debugging
Handle errors gracefully and debug automation issues effectively.

