Playwright & Cypress Test Script Generator
Build end-to-end test scripts visually. Add steps — navigate, click, fill, assert — and get ready-to-run Playwright (TypeScript) or Cypress test code instantly. No coding required.
Steps (3)
Generated Playwright (TypeScript) test
import { test, expect } from '@playwright/test';
test('Homepage smoke test', async ({ page }) => {
await page.goto('https://example.com');
await expect(page).toHaveTitle(/Example Domain/i);
await expect(page.locator('h1')).toBeVisible();
});How to run this test
1. Install Playwright
npm init playwright@latest
2. Save the generated code
Save as tests/my-test.spec.ts
3. Run
npx playwright test
Add --ui for the visual test runner, --headed to watch the browser.
How to use
- 1Choose your framework
Select Playwright (TypeScript) or Cypress (JavaScript). Both output complete, runnable test files.
- 2Name your test
Enter the test name and (for Cypress) the describe() suite name. These map directly to the test runner output.
- 3Add steps
Choose a step type from the dropdown — navigate, click, fill a form, assert text, take a screenshot, and more. Fill in the selector and value fields for each step.
- 4Reorder and remove
Use the ↑/↓ arrows to reorder steps and ✕ to delete any step. The code preview updates live.
- 5Copy and run
Click "Copy" to grab the generated code, paste it into a .spec.ts (Playwright) or .cy.js (Cypress) file, and run it with the commands shown in "How to run this test."
Examples
navigate → fill email → fill password → click Submit → assert text "Dashboard"
test('Login form', async ({ page }) => {
await page.goto('https://myapp.com/login');
await page.locator('#email').fill('user@example.com');
await page.locator('#password').fill('secret');
await page.locator('button[type=submit]').click();
await expect(page.getByText('Dashboard')).toBeVisible();
});navigate → assert title → assert element visible → screenshot
describe('Smoke', () => {
it('Homepage loads', () => {
cy.visit('https://myapp.com');
cy.title().should('include', 'My App');
cy.get('nav').should('be.visible');
cy.screenshot('homepage');
});
});Frequently asked
Playwright is a modern end-to-end testing framework by Microsoft that lets you write scripts to control a real browser — Chrome, Firefox, or Safari — to test your web app. It supports TypeScript, Python, Java, and C#.
Cypress is a JavaScript-based end-to-end testing framework that runs directly inside the browser. It has a visual test runner and is popular for React/Vue/Angular apps. It supports JavaScript and TypeScript.
Yes. For Playwright, any valid CSS selector works (e.g. #id, .class, button[type=submit]). You can also use Playwright's locator shortcuts like text=Submit or role=button. For Cypress, use standard CSS selectors passed to cy.get().
It is a working, runnable starting point. For real test suites you may want to add page-object models, fixtures, retry logic, and CI configuration. The generator gives you the core test steps — the scaffolding around them is up to you.
Playwright is generally faster, supports multiple browsers natively, has excellent TypeScript support, and handles complex async scenarios well. Cypress has a friendlier visual runner and a large plugin ecosystem. Both are excellent choices in 2026.
Related tools
- Regex TesterTest JavaScript regular expressions against any string with live match highlight
- JSON FormatterFormat, validate, and minify JSON in your browser. See parse errors with line/co
- cURL to fetch() ConverterPaste a curl command and get a JavaScript fetch() equivalent. Handles method, he
- .env File ParserParse a .env file and see it as a JSON object. Handles comments, quoted values,
- Base ConverterConvert numbers between binary, octal, decimal, and hexadecimal. Supports huge n
- Credit Card ValidatorValidate credit card numbers with the Luhn algorithm and detect the brand: Visa,