Setup with Playwright
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 basic wallet setup file (e.g.,
wallet-setup/basic.setup.ts
): -
Create a 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).
-
Build wallet cache:
-
Run the tests:
This will execute your tests using Playwright with Synpress integration.
Next Steps
- Explore the API documentation for detailed Synpress functionalities
- Check out example projects in the Synpress GitHub repository
- Join our Discord community for support and best practices