Now with AI-powered test fixing

Browser Automation That Fixes Itself

Write maintainable automation scripts with Stepwright's fluent API. When tests break, Fixwright uses AI to automatically detect and fix the issue.

search-example.ts
import { Stepwright } from '@autowright/stepwright';

const script = Stepwright.create('DuckDuckGo Search')
  .config({ headless: false })
  .checkpoint('Setup', { required: true })

  .step('Navigate to search', async (ctx) => {
    await ctx.page.goto('https://duckduckgo.com');
  })

  .step('Enter search query', async (ctx) => {
    await ctx.page.fill('input[name="q"]', 'Playwright automation');
    await ctx.page.keyboard.press('Enter');
  })

  .endCheckpoint();

await script.run();

Everything You Need for Reliable Automation

Stepwright and Fixwright work together to keep your automation scripts running smoothly.

Fluent API

Chain steps together with an intuitive, readable API that makes automation scripts easy to write and maintain.

Checkpoints & Recovery

Group steps into checkpoints with automatic retries and graceful failure handling.

AI-Powered Fixing

When tests break, Fixwright analyzes the failure and automatically proposes fixes using Claude AI.

TypeScript First

Full TypeScript support with intelligent autocompletion and type-safe configurations.

Artifact Capture

Automatically capture screenshots, DOM snapshots, and console logs on failure for debugging.

CI/CD Ready

Run headless in CI pipelines with JSON reporting, exit codes, and easy integration.

See It In Action

Two packages that work together: run scripts with Stepwright, fix them with Fixwright.

// Write automation scripts with a fluent API
import { Stepwright } from '@autowright/stepwright';

const script = Stepwright.create('Login Flow')
  .config({
    headless: true,
    screenshotOnFailure: true,
    trace: { mode: 'on-failure' }, // Capture traces on failure
  })
  .data({ username: 'testuser' })

  .checkpoint('Authentication')
  .step('Navigate to login', async (ctx) => {
    await ctx.page.goto('https://app.example.com/login');
  })
  .step('Enter credentials', async (ctx) => {
    await ctx.page.fill('#username', ctx.data.username);
    await ctx.page.fill('#password', process.env.TEST_PASSWORD!);
    await ctx.page.click('button[type="submit"]');
  })
  .step('Verify logged in', async (ctx) => {
    await ctx.page.waitForSelector('.dashboard');
    ctx.log('Successfully logged in!');
  })
  .endCheckpoint();

const result = await script.run();
// On failure: generates FailureCase with trace, screenshot, DOM snapshot
// AI service that automatically fixes failing scripts
import { FixingLoop, FileFailureSource } from '@autowright/fixwright';

// Configure AI fixing with Claude Agent SDK
const fixingLoop = new FixingLoop({
  ai: {
    apiKey: process.env.ANTHROPIC_API_KEY,
    model: 'claude-sonnet-4-20250514',
    maxTurns: 20,
    permissionMode: 'bypassPermissions',
  },
  git: {
    baseBranch: 'main',
    fixBranchPrefix: 'fix/stepwright-',
  },
  github: {
    token: process.env.GITHUB_TOKEN,
    owner: 'your-org',
    repo: 'your-repo',
  },
}, new FileFailureSource('./failure-cases'));

// Listen for fix events
fixingLoop.on('attempt:success', (attempt) => {
  console.log('Fixed!', attempt.proposedFix?.explanation);
});

fixingLoop.on('pr:created', (url) => {
  console.log('PR created:', url);
});

// Process a failure case from Stepwright
await fixingLoop.processFailure(failureCase);

Get Started in Minutes

Install the packages and start automating.

1

Install Stepwright (runner)

npm install @autowright/stepwright playwright
2

Create your first script

npx stepwright init my-script.ts
3

Run it

npx stepwright run my-script.ts
+

Optional: Add AI auto-fixing

npm install @autowright/fixwright

Fixwright uses AI to automatically fix failing scripts and create PRs.

Ready to Automate?

Start building reliable browser automation today. Open source and free to use.