Migrate from Puppeteer
Puppeteer scripts are imperative browser automation: page.waitForSelector, page.$eval, manual retries, and assertions bolted on through Jest or plain Node scripts. They work until the DOM changes, and then someone spends an afternoon updating selectors.
TesterArmy replaces scripted automation with an AI agent that executes natural-language steps using vision. The fastest migration path is letting your coding agent (Claude Code, Cursor, Codex) read your Puppeteer code and convert it with the TesterArmy CLI.
How concepts map
What translates and what doesn’t
End-to-end user flows translate cleanly - the intent behind each page.* call becomes an act step and each assertion becomes an assert step.
Things to leave behind:
- Scraping and PDF generation scripts - Puppeteer is the right tool for those; TesterArmy is for testing user flows.
- Request interception (
page.setRequestInterception) - TesterArmy runs against a real environment such as staging or a preview deployment. - Low-level browser tweaks (custom user agents, CDP sessions) - configure environment-level needs like viewport size per project instead.
Prerequisites
Get an API key from the dashboard. For non-interactive agent sessions, set TESTERARMY_API_KEY instead.
The migration prompt
Paste this into your coding agent in the repository that contains your Puppeteer tests:
After the migration
- Review the migrated tests in the dashboard - step titles should describe intent, not DOM structure.
- Add credentials for any login flows the agent flagged.
- Replace your Puppeteer CI job with
ta tests run --group <groupId>or a group webhook. - Keep Puppeteer for scraping or PDF work; delete the test scripts once TesterArmy runs are green.
