Setup with Playwright
Quick Setup - Playwright with Synpress
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
-
Install Playwright and its dependencies:
Follow the prompts to complete the installation.
-
Install Synpress as a dev dependency:
Setup
-
Create or update your Playwright configuration file (e.g.,
playwright.config.ts
): -
Create a
BasicSetup
file (e.g.,wallet-setup/basic.setup.ts
): -
Create a simple test file (e.g.,
tests/example.spec.ts
):
Running Tests
To run your Playwright tests with Synpress:
-
Start your local development server (if testing against a local app).
-
Run the tests:
This will execute your tests using Playwright with Synpress integration.
Next Steps
- Check the API documentation for detailed Synpress functionalities.
- Explore example projects in the Synpress GitHub repository.
- Join our Discord community for support and best practices.