Skip to main content

🚀 Features

Fast Screenshots

Capture website screenshots with customizable options including full-page, element-specific, and batch processing.

Agentic Testing

Run browser tests using natural language instructions with AI agents that understand and execute complex testing scenarios.

Test Templates

Create reusable test templates with structured output schemas for consistent and repeatable testing.

Batch Operations

Process multiple screenshots and tests efficiently with built-in concurrency control and error handling.

📦 Quick Installation

npm install browsertest-sdk
# or
yarn add browsertest-sdk

💡 Basic Usage

import { BrowserTest } from 'browsertest-sdk';

const bt = new BrowserTest({
  apiKey: 'your-api-key-here' // Get from https://browsertest.in
});

// Take a screenshot
const screenshot = await bt.screenshot.take({
  url: 'https://example.com',
  fullPage: true,
  format: 'png'
});

// Run an agentic test
const testResult = await bt.testing.execute({
  instructions: 'Test the login functionality with valid credentials',
  url: 'https://example.com/login',
  outputSchema: {
    type: 'object',
    properties: {
      loginSuccessful: { type: 'boolean' },
      userName: { type: 'string' },
      errorMessage: { type: 'string' }
    }
  }
});

🛠️ Built for Developers

TypeScript Support

Full type definitions included with comprehensive IntelliSense support.

Async Job Management

Queue and monitor long-running test jobs with real-time status updates.

📊 Usage & Quotas

Track your API usage and manage quotas with built-in monitoring:
// Check current usage
const usage = await bt.getUsage();
console.log('Screenshots used:', usage.usage.screenshot.used);
console.log('Agentic tests used:', usage.usage.agentic.used);

🎯 Perfect For

  • QA Automation: Automate repetitive testing tasks
  • Visual Regression: Capture and compare screenshots
  • E2E Testing: Run complex user journey tests
  • Monitoring: Regularly check website functionality
  • Documentation: Generate visual documentation

📈 Plans & Pricing

  • Starter: 1,000 screenshots/month, 100 agentic tests/month
  • Pro: 10,000 screenshots/month, 500 agentic tests/month
  • Enterprise: Custom limits and features
Get your API key at BrowserTest Dashboard to start using the SDK.