AI E2E Test Generator (Playwright, Cypress & Selenium)
Describe a journey; get a test whose locators are checked against your page’s HTML.
Try before you buy.
- Free preview: the step plan with every locator checked against your HTML, and the first lines of the test file (up to 10), for new tests and migrations.
- Locked until you unlock it: download and copy.
- Unlock: Pro pass, ₹179 for 30 days or ₹79 for 1 week, a one-time payment that never renews. Unlock: Pro pass, $5.99 for 30 days or $2.99 for 1 week, a one-time payment that never renews.
Ways to unlock shows how to get the full result.
Printing this result is locked in the free preview.
One action or check per line, as plain steps, Gherkin (Given, When, Then) or a user story with acceptance criteria. Use a test account: passwords are read from the E2E_PASSWORD environment variable in the code, never written into it. Ctrl+Enter writes the test.
In your browser: View page source, or the developer tools’ Elements panel → Copy outerHTML. For a journey over several pages, paste each page one after another. It is read on your device only.
Paste a Cypress spec or a Selenium test in Java, Python or JavaScript.
Write the test reads the journey with rules. Plan with AI reads looser wording, such as a user story, into steps; the code is then written from those steps, so every locator is one that was checked.
When your device can't answer, this goes to MySmartCoPilot's cloud AI. Personal details such as email addresses and phone numbers are masked first, and we don't keep it. How AI works
Choose how to run this
Stopping may still count toward today's free server AI.
Free server AI today (estimate):
Step plan
Code
This file unlocks with the full result: the page objects, the configuration, the sign-in setup and the README come with a pass, or after unlocking this result.
Migration checklist
Checks
Locked in the free preview. Opens the ways to unlock this result.
Locked in the free preview. Batch runs unlock with a pass.
Locked in the free preview. Query results unlock with a pass.
About the AI E2E Test Generator (Playwright, Cypress & Selenium)
Describe a user journey in plain steps, as a Gherkin scenario or as a user story with acceptance criteria, and get an end-to-end test for Playwright Test (TypeScript, JavaScript or Python), Cypress, Selenium WebDriver (Java, Python or C#) or WebdriverIO: the test file, page objects if you want them, a sign-in that runs once and is reused, the framework’s config and a README with the run commands.
Paste the HTML of your pages and every locator is checked before the code is written. Each target is found in the HTML and gets locators in the order role and accessible name, label, test id (data-testid, data-test, data-cy), then text; each one is counted against the page with the matching rules of the framework that runs it, and a step is marked as checked only when its locator matches exactly one element. Every wait is a web-first assertion that waits by itself: no fixed sleeps.
The AI is optional. It turns looser wording into steps, and the code is then written from those steps, so it never invents a locator or an API. Migration mode converts existing Cypress and Selenium tests to Playwright, with a checklist of the commands that have no direct equivalent. Without a pass the result is a free preview: the step plan with its checked locators, the checks and the first lines of the test file; the whole project, copying and the downloads unlock with a Pro pass.
How to use it
- Choose Write a test and a framework, then describe the journey, one action or check per line (for example
Click the "Sign in" button,The URL should contain /dashboard), paste a user story or a Gherkin scenario, or load an example. - Paste the HTML of the pages the test visits (from View page source, or the outerHTML of the page in your browser’s developer tools; several pages one after another), and set the base URL of your app. It stays on your device.
- Tick Page objects for one class per page, and Sign in once and reuse the session when the journey signs in: the sign-in moves into a setup step and the test starts signed in.
- Press Write the test (Ctrl+Enter). Read the step plan: each step shows the locator the code uses and whether it matches exactly one element. Correct a step with Edit as text, or press Plan with AI for wording the rules do not read.
- Read the checks under the code (unchecked locators, TODOs, fixed waits), then copy the file or download the whole project as a ZIP: with a pass, or after unlocking this result.
- To move existing tests, choose Migrate a test, paste a Cypress spec or a Selenium test and press Migrate to Playwright; the checklist lists every line to finish by hand.
Examples
Go to /login Fill the email field with "alice@example.com" Click the "Sign in" button I should see "Welcome back, Alice"
await page.goto('/login');
await page.getByRole('textbox', { name: 'Email address' }).fill('alice@example.com');
await page.getByRole('button', { name: 'Sign in' }).click();
await expect(page.getByText('Welcome back, Alice')).toBeVisible();The field’s label in the HTML is “Email address”, so the role locator uses the real accessible name rather than the words of the step.
<button type="submit" data-testid="sign-in">Sign in</button>
cy.get('[data-testid="sign-in"]').click();
clickable(By.cssSelector("[data-testid=\"sign-in\"]")).click();
await $('[data-testid="sign-in"]').click();Each framework gets the locator its own documentation recommends that the HTML supports, counted the way that framework counts it.
cy.get('[data-cy=new-todo]').type('Pay bills{enter}');
cy.wait(500);await page.locator('[data-cy=new-todo]').fill('Pay bills');
await page.locator('[data-cy=new-todo]').press('Enter');
// line 2: cy.wait(500); was removed: Playwright's actions and assertions wait by themselves.Common uses
- Turn the acceptance criteria of a ticket into a first end-to-end test before the feature ships.
- Give a manual tester’s steps to a developer as a runnable Playwright, Cypress, Selenium or WebdriverIO test.
- Check which locators of a page are unique before writing tests by hand, and find elements that need a test id.
- Move a Cypress or Selenium suite to Playwright one file at a time, with a list of what to finish.
How locators are chosen and checked
Each step’s target, such as the "Sign in" button or the email field, is matched to an element of the pasted HTML by its accessible name, label, placeholder, test id, id, name and text, with the kind of element the words name (button, link, field, checkbox, drop-down …). The element then gets its candidate locators in the order role and accessible name, label, test id, text, then placeholder, alt text, title, id, name, CSS and XPath, and each is counted against its page:
- Playwright’s
getByRole,getByLabelandgetByTextmatch names as a case-insensitive part of the text unlessexactis set; the count follows that rule, andexact: trueis added when only the whole name is unique. - CSS selectors are counted with the browser’s own
querySelectorAll, and XPath with itsdocument.evaluate. - A locator is marked ✓ 1 match only when it matches exactly one element. When two elements match the words equally, the step is marked ambiguous and the code uses the first, with a comment; give the element a test id to make it unique.
Each framework uses the best checked locator it supports: role and label locators in Playwright (locators); data-cy, data-test and data-testid, then ids, names and cy.contains() in Cypress (selecting elements); ids, names, CSS, link text and XPath in Selenium (locator strategies); CSS, button=Sign in and XPath in WebdriverIO, whose $ must match one element (selectors).
No fixed waits
Every check is written so it waits until it holds: await expect(locator).toBeVisible() in Playwright, .should(…) in Cypress, await expect(…).toBeDisplayed() in WebdriverIO, and explicit WebDriverWait conditions in Selenium, which never mixes in an implicit wait (Selenium on waits). A line such as “wait 3 seconds” is left out with a note: write what to wait for instead, for example Wait for the "Saved" message. The checks list flags any sleep left in the code, and migration removes cy.wait(1000) and Thread.sleep().
Sign in once and reuse the session
With Sign in once and reuse the session, the steps that sign in (a password field and its submit) run once and the tests start signed in:
- Playwright Test: a setup project saves
storageStatetoplaywright/.auth/user.json, and the browser projects depend on it (authentication); in Python, a session fixture savesstorage_statethe same way. - Cypress: a
cy.login()command aroundcy.session()(cy.session). - Selenium and WebdriverIO: the session cookies are saved after signing in and set in each later browser.
Passwords are never written into the code: they are read from the E2E_PASSWORD environment variable (in Cypress through cy.env(), environment variables), and the saved session folder is listed in .gitignore.
What the project contains
- Playwright Test:
tests/*.spec.ts(or.js), page objects inpages/,playwright.config.tswith the base URL,package.jsonand a README. Runnpm install,npx playwright install chromiumandnpx playwright test. - Playwright for Python: a pytest test,
pytest.iniwithbase_url,requirements.txt(pytest-playwright). Runpytest. - Cypress:
cypress/e2e/*.cy.js,cypress.config.jsand the support files. Runnpx cypress run. - Selenium: JUnit with Maven (
pom.xml,mvn test), pytest (pytest), or NUnit test files with thedotnet new nunitcommands to create the project around them (dotnet test). - WebdriverIO:
test/specs/*.e2e.js,wdio.conf.jsandpackage.json. Runnpx wdio run ./wdio.conf.js.
Migrating Cypress and Selenium tests
Migration reads the test statement by statement. cy.visit, cy.get(…).click(), .type() with {enter}, .should(…) checks, cy.url() and cy.title() become Playwright locators and assertions; Selenium’s findElement, sendKeys, Select, Actions, explicit waits and JUnit, TestNG, unittest or pytest assertions become their Playwright equivalents, and driver set-up and quit() are dropped. A Python unittest.TestCase class becomes plain pytest functions that get the page, and its setUp becomes an autouse fixture (or goes, when it only started the driver).
Network stubbing (cy.intercept), aliases, .then() callbacks, custom commands, frames, dialogs and scripts stay in the code as TODO comments with their line, the whole statement when it runs over several lines, and the checklist says what to use in Playwright instead. In Java, try/catch and counted for loops keep their shape; an if or while block stays whole as one TODO, so none of its steps runs unconditionally.
Limitations
- Locators are checked against the HTML you paste, as it is: style sheets are not applied (an element hidden by CSS counts as shown), and what the page loads later is not in it. Paste the page in the state the step sees it.
- Accessible names follow the common rules of the accessible name computation (labels, aria-label, aria-labelledby, alt, title and the text inside); unusual markup can get another name in a real browser.
- The rule-based reader reads English, one action or check per clause; a line it does not understand is listed with its number, never guessed. Rephrase it, or use Plan with AI.
- The project files name minimum versions of each framework; newer versions usually work, but check the release notes when you upgrade.
- Migration converts common commands; callbacks, custom commands, network stubbing and frames are left as TODO comments to finish by hand.
- With Selenium and WebdriverIO, Sign in once and reuse the session carries the session’s cookies over. An app that keeps its sign-in in local storage instead needs that storage copied too (Playwright’s storage state and Cypress’s cy.session() keep both).
- Write tests only for apps you own or are allowed to test. Steps that solve CAPTCHAs, sign up many accounts or collect data from a site are not written.
Privacy
Cloud AI only if you choose it: you see what is sent first
The journey, the pasted HTML and the generated code stay in your browser. Plan with AI runs on your device (your browser’s built-in AI or a model on your device), or, with a pass, on MySmartCoPilot’s cloud AI, which receives the journey with passwords masked and the role and name of the page’s elements, never the HTML.
Frequently asked questions
What do I get without a pass?
Without a pass, AI E2E Test Generator (Playwright, Cypress & Selenium) shows the step plan with every locator checked against your HTML, and the first lines of the test file (up to 10), for new tests and migrations. Until you unlock it, the result can’t be downloaded or copied. A Pro, Premium or Ultimate pass, a one-time payment that never renews, unlocks the full result. The pricing page lists the passes and their prices.
Does the AI write the code?
No. The AI only turns your words into test steps. The code is written from those steps by the generator, so every locator comes from your HTML (or is marked as not checked) and every check is a web-first assertion. Without AI, the rule-based reader turns plain steps and Gherkin into the same steps.
Which locators does it use?
Role and accessible name first, then label, test id (data-testid, data-test, data-cy), then text, as Playwright recommends; CSS and XPath only when nothing better matches one element. Each framework gets the best one it supports, counted the way that framework counts it.
Is my page’s HTML uploaded?
No. The HTML, the journey and the code stay in your browser. Only if you use Plan with AI with MySmartCoPilot’s cloud AI, with a pass, is the journey sent, with passwords masked, together with the role and name of the page’s elements; the HTML never is.
Why is there no wait or sleep in the code?
Fixed waits make tests slow and flaky. Every action and check in the code waits for its element by itself, so a line like “wait 3 seconds” is left out. Write what to wait for instead, for example Wait for the "Saved" message.
How do I copy a page’s HTML?
Open the page, then use View page source, or open the developer tools, right-click the <html> element in the Elements panel and choose Copy, then Copy outerHTML. Paste the pages one after another for a journey over several pages.
Can I test a site that is not mine?
Write tests only for apps you own or are allowed to test. The tool does not write steps that solve CAPTCHAs, create many accounts or collect data from a site.
Do I need a pass?
To copy or download the full project, yes: a Pro pass unlocks every Pro tool. Without a pass you see a free preview of your own result: the step plan with every locator checked against your HTML, and the first lines of the test file (up to 10).