Skip to main content
This guide provides a quick setup process for Playwright with Synpress to automate tests for Web3 dapps. Note that this is a basic configuration, and Synpress offers many more advanced functions and features for comprehensive testing.

Prerequisites

  • Node.js v18+
  • Playwright and TypeScript knowledge

Installation

  1. Install Playwright and its dependencies:
    Follow the prompts to complete the installation.
  2. Install Synpress as a dev dependency:

Setup

  1. Create or update your Playwright configuration file (e.g., playwright.config.ts):
  2. Create a basic wallet setup file (e.g., wallet-setup/basic.setup.ts):
  3. Create a test file (e.g., tests/example.spec.ts):

Running Tests

To run your Playwright tests with Synpress:
  1. Start your local development server (if testing against a local app).
  2. Build wallet cache:
  3. Run the tests:
This will execute your tests using Playwright with Synpress integration.

Next Steps