Browser Automation

Build Browser UI Tests with a Clean, Type-Safe DX

Tomation provides a structured DSL with TypeScript-powered autocomplete and type checking. Write readable test scripts, compile them to portable JSON, and run them directly in the browser.

Key Features

Structured DSL

TypeScript Authoring, Portable JSON Execution

Write tests using a structured DSL with full autocomplete and type safety in your editor. The compiler transforms your scripts into portable .tomation.json files that run directly in the browser extension with visual step-by-step feedback.

Where Matchers

Declarative Element Targeting

Define UI elements with readable selectors such as is.BUTTON.where(idIs('login-btn')).as('Submit') to keep tests explicit and maintainable.

const submitButton = is.BUTTON
  .where(idIs('login-btn'))
  .as('Submit')
Actions

Simulate Real User Interactions

Built-in actions for clicks, typing, selecting options, navigation, and waiting. Each action targets elements declared in your POM files.

Click(Login.submitButton)
Type('admin').in(Login.usernameInput)
TypePassword('secret').in(Login.passwordInput)
Select('Option A').in(dropdown)
Navigate('dashboard/index.html')
Wait(500)
Save To Context

Capture Dynamic Values for Later Steps

Store runtime values from the DOM and reuse them in later steps to keep multi-step flows robust and data-aware.

SaveText(orderIdLabel).as('orderId')
Type('{{ctx.orderId}}').in(searchInput)
Test Data

Data Templates & Fake Generators

Define reusable data templates with Data() and generate realistic random values using Fake generators. Each test run produces fresh names, emails, phones, and more — no hardcoded values.

import { Data, Fake } from '@tomationjs/dsl'

const user = Data({
  name: Fake.fullName(),
  email: Fake.email(),
  role: Fake.oneOf(['Admin', 'Editor', 'Viewer']),
})
Tests

Readable Test Scenarios with Assertions

Define test cases using Test() blocks that combine actions and assertions. Each test runs independently with visual pass/fail feedback in the extension.

Test('Login with valid credentials', () => {
  Login.fillCredentials({ username: 'admin', password: 'secret' })
  Login.submit()
  AssertHasText(Login.message, 'Login successful')
})
Automations

Parameterized Workflows with Runtime Forms

Automations are reusable workflows that accept parameters. Before execution, the extension renders a form where users fill in the values — making automations shareable with non-technical team members.

Automation('Create New User', (
    params: { name: 'string', role: 'string' }
  ) => {
    Navigate('admin/users.html')
    Click(Admin.addUserButton)
    Type(params.name).in(Admin.nameInput)
    Select(params.role).in(Admin.roleSelect)
    Click(Admin.saveButton)
  }
})

Parameters appear as form fields in the extension panel before each run.

Lab — AI-Powered

Generate POM Files with a Single Click

Stop writing element selectors by hand. Open the Lab tab, visually select any component on the page, and let your preferred AI service generate a complete .pom.ts file — including smart Task functions for common user workflows like login, search, and navigation.

  • → Point-and-click element inspection with live overlay
  • → Privacy-safe: sensitive data stripped before sending to AI
  • → Bring your own API key (OpenAI, Anthropic, Gemini, or custom)
  • → Generates reusable Tasks, not just element descriptors

Never Restart a Test from Scratch

Pause · Live-Fix · Resume

Fix What Went Wrong Without Losing Your Place

Tests break for reasons that have nothing to do with your selectors — an unexpected modal blocks a click, the app is in a dirty state from a previous run, or a stale session throws you off course. These moments don't mean your test is wrong.

When a step hits an unexpected failure, Tomation pauses execution and keeps the browser alive. The DOM stays live and interactive — nothing is lost.

  • → Take over the page by hand — dismiss the modal, reset the state, or navigate manually to get things back on track.
  • → Retry the paused step once the page is ready, or skip it and move on.
  • → Resume from where you left off — the rest of the run continues, no restart from step one.

Traditional test runners stop at the first thrown action — you fix the code and re-run the whole test to get back to that point. Tomation lets you fix the situation live and keep going.

Readable Tests, Zero async/await

Command Queue

Write Steps, Not Promises

Browser automation is asynchronous, so most tools make you scatter await across every line. The intent of the test gets buried under async plumbing that has nothing to do with what you're testing.

Tomation uses a deferred execution pattern: each DSL call doesn't run immediately — it enqueues a command. Your test body reads like a plain, top-to-bottom list of steps, and the engine runs them in order at execution time.

Async everywhere

await page.click('#login-btn')
await page.fill('#username', 'admin')
await page.fill('#password', 'secret')
await page.click('#submit')
await expect(page.locator('#msg'))
  .toHaveText('Login successful')

Clean command queue

Click(Login.submitButton)
Type('admin').in(Login.usernameInput)
TypePassword('secret').in(Login.passwordInput)
Click(Login.submitButton)
AssertHasText(Login.message, 'Login successful')
  • → No async/await noise — every line is a step, so tests read like a script a person would follow.
  • → Ordering is guaranteed — commands run sequentially in the order you wrote them, no forgotten await causing race conditions.
  • → Inspectable before it runs — because steps are queued, the extension can show the full plan and let you run, retry, or skip individual steps.