Installation Guide

This guide will walk you through the complete installation and setup process for Auto-Browse.

Prerequisites

Before installing Auto-Browse, make sure you have:

  • Node.js 16 or higher
  • npm or yarn package manager
  • A code editor (VSCode recommended)

Package Installation

Install Auto-Browse using npm:

npm install @auto-browse/auto-browse

Or using yarn:

yarn add @auto-browse/auto-browse

⚠️ Important: Playwright Version Requirements

Auto Browse requires Playwright version 1.53.0 or higher.

Required Versions

"@playwright/test": ">=1.53.0"
"playwright": ">=1.53.0"

Version Conflicts

If you’re using Auto Browse alongside an existing Playwright setup, ensure you’re using compatible versions. Here’s how to handle common issues:

  1. Installation Conflicts

    npm install --legacy-peer-deps
    

    This flag helps resolve peer dependency conflicts during installation.

  2. Multiple Playwright Versions

    • Remove existing Playwright installations
    • Clear npm cache if needed: npm cache clean --force
    • Reinstall with the required versions
  3. Project Compatibility

    • Update your project’s Playwright configuration
    • Ensure your existing tests are compatible
    • Consider using a separate test environment if needed

Verification

To verify your installation:

  1. Create a test file (e.g., test.ts):
import { auto } from "@auto-browse/auto-browse";

async function verify() {
	try {
		await auto("go to https://example.com");
		await auto("take a snapshot");
		console.log("Auto-Browse is working correctly!");
	} catch (error) {
		console.error("Error:", error);
	}
}

verify();
  1. Run the test:
npx ts-node test.ts

Next Steps