@playmatic/sdk
v0.2.2
Published
Environment management and AI helpers for Playwright tests
Maintainers
Readme
Playmatic SDK
Test SDK for creating self-healing E2E tests that combine natural language with cached steps.
Installation
# npm
npm install @playmatic/sdk
# pnpm
pnpm add @playmatic/sdk
# yarn
yarn add @playmatic/sdkWhat are Playmatic Tests?
Playmatic tests are Playwright tests enhanced with AI helpers for robust, self-healing E2E testing:
import { aiClick, aiVerify, env } from '@playmatic/sdk';
import { test, expect } from '@playwright/test';
test('User can login and access dashboard', async ({ page }) => {
await test.step('Navigate to login', async () => {
// Use deterministic Playwright for stable navigation
await page.goto(env.baseUrl + '/login');
});
await test.step('Verify login form with AI', async () => {
// Use AI for visual verification
await aiVerify('login form with email and password fields is visible', page);
});
await test.step('Submit login', async () => {
// Use AI to click elements that might have brittle selectors
await aiClick('login button', page);
await expect(page).toHaveURL(/dashboard/);
});
});When selectors break or UI changes, AI computer vision automatically figures out how to accomplish the intent using visual understanding.
Complete guides, examples, and API reference at docs.playmatic.ai
