Seamless Integration
Existing Playwright Code Works Unchanged
Your existing Playwright tests work out of the box with Stably SDK:Zero Breaking Changes
All Playwright APIs are fully supported:- Page interactions: click(),fill(),selectOption(), etc.
- Assertions: All expectmatchers work identically
- Configuration: playwright.config.tsfiles work unchanged
- Test runners: npx playwright testcommands work the same, though we recommend usingnpx stably testcommand for additional auto-healing capabilities
- Fixtures: Custom fixtures and page objects work unchanged
Enhanced Capabilities with AI
While maintaining full compatibility, Stably SDK adds AI-powered features:AI-Powered Assertions
Perform complex actions with AI
Integration Steps
1
Install Playwright and Stably SDK
Stably SDK now supports bringing your own Playwright version. Install both:
2
Setup API Key
Get a Team API Key from your Stably Settings and set it as an environment variable:
The tests will expect 
process.env.STABLY_API_KEY, but you can also programmatically set a key using the setApiKey function from @stablyai/playwright-test:3
Update Imports
Replace all imports from 
@playwright/test with @stablyai/playwright-test:4
Add Stably CI Reporter (Optional)
To integrate with Stably’s cloud platform and view test results in the dashboard, configure the reporter in your Set environment variables:
playwright.config.ts:playwright.config.ts
- Get your Team API Key from Stably Settings
- Find your Project ID in your project settings on the Stably Dashboard
- The reporter is now included in @stablyai/playwright-test- no separate package needed!
Performance Benefits
- Automatic maintenance of test suites via our auto-maintenance agents
- Flexible version control - choose your preferred Playwright version