Web3 wallets for Playwright.
This library provides methods for interacting with Web3 wallets using Playwright.
npm install -D w3wallets
Only the Backpack
wallet is supported at this point.
npx w3wallets backpack
The unzipped files should be stored in the wallets/backpack
directory. Add them to .gitignore
.
import { test as base } from "@playwright/test";
import { withWallets } from "../src/withWallets";
const test = withWallets(base, { backpack: true });
test("has title", async ({ page, backpack }) => {
await page.goto("https://playwright.dev/");
const privateKey =
"4wDJd9Ds5ueTdS95ReAZGSBVkjMcNKbgZk47xcmqzpUJjCt7VoB2Cs7hqwXWRnopzXqE4mCP6BEDHCYrFttEcBw2";
await backpack.onboard("Eclipse", privateKey);
});