e2e replaces a Selenium suite with TypeScript tests. Locators find nodes by role and label, and assertions retry until they pass or time out. A Java or Python suite needs a rewrite, so run both suites and move one flow at a time.
Migrate this project's Selenium tests to e2e, one flow at a time. Docs: https://e2e.tester.army/docs/migrate/selenium.md
- Read the migration guide above. It maps Selenium config and WebDriver calls to e2e.
- e2e tests are TypeScript. If the Selenium suite is Java, Python, or another language, ask me where the new test project should live, for example an
e2e/folder with its ownpackage.json. - If that project has no e2e config (
e2e.config.ts,.mts,.js, or.mjs), runnpx e2e init --yes(or the pnpm or bun equivalent) there. It writes a config and an example test, and installs nothing yet. - Read the e2e skill (
npx e2e guideprints it,npx e2e guide <topic>prints a topic) and follow it for every step below. - If you ran init, ask me which model to use for agent steps: a ChatGPT, GitHub Copilot, OpenCode Console, or SuperGrok subscription, an API key, or a local model. Configure it with its provider package. If it needs a sign-in, give me the
npx e2e logincommand and wait until I confirm. - Set the target's
appto the URL everydriver.getused, and the command that starts the app if the suite starts it. Move passwords and tokens intocredentialsorsecrets. - Install dependencies.
- List the page objects and the flows that use them, and ask me which to move first. Suggest one page object and its flows.
- Rewrite those flows as
.e2e.tsfiles undertests/(e2e runstests/**/*.e2e.tsby default) with the guide's tables. Prefer role, label, and test id queries over CSS and XPath. Replace every wait andThread.sleepwith a locator assertion. Narrow queries that match several nodes. Turn the page object's setup code into a fixture. - Keep navigation and the final assertions deterministic, with
app.open()and locator assertions. Where a run of scripted interactions breaks often, propose anagent.actgoal for it instead. - Run the new files with
npx e2e run <file>and fix them until they pass. Keep the Selenium tests until I confirm they can go. - Summarize which flows moved, which stayed in Selenium, and why.
For a migration that spans several sessions, the migrate-to-e2e skill records what moved in a progress file and keeps the old suite running until you retire each test.
Port the config
Rewrite one flow
Start with one page object and the flows that use it.
Locator actions wait for their targets, so no explicit wait is left. The password comes from configured credentials.
Map each WebDriver call
findElement takes the first match. e2e fails with LOCATOR_AMBIGUOUS on
several, so narrow with .filter(), .first(), or .nth().