# Convert to Stagehand Script

Convert an existing Playwright script to Stagehand format using Browserbase's integrated playground, then execute the converted script. This workflow enables you to modernize browser automation code from Playwright to Stagehand's agent-based approach.

## Steps

1. Click "Playground" link
2. Click "console.info("Launching browser..."); /* To make things easier, we've setup Playwright using the window variables. You can access it and your API key using window.playwright or window.connectionString. */ console.info('Connected!'); /** * 👋 Welcome" presentation
3. Click "console.info("Launching browser..."); /* To make things easier, we've setup Playwright using the window variables. You can access it and your API key using window.playwright or window.connectionString. */ console.info('Connected!'); /** * 👋 Welcome" presentation
4. Press Cmd + v
5. Type into "Editor content;Press Alt+F1 for Accessibility Options." textbox
6. Click "Convert to Stagehand" button
7. Click "Accept changes" button
8. Click "Run ⌘" button
