Skip to main content

Installation 🌟

Hey there, buddy! 🌟 Get ready to plug in and power up with plugandplaywright - your new best friend in the coding universe! 🚀 Imagine diving into a world where your code doesn't just run; it practically dances off the screen, turning every test into a thrilling adventure of precision and pizzazz. 🎉

🚀 Let's Spark Things Up - Quick Setup​

Jump right in with these simple steps to add some spark to your Playwright scripts! It's like giving your automation a supercharge of excitement:

npm i plugandplaywright

And hey, let's make sure you're all set up with Playwright too:

npm init playwright@latest

🎭 Basic Charms to Light Up Your Tests

plugandplaywright is here to enchant your testing toolkit with some electrifying spells 🌩ī¸ - think of getText, getHeading, and clickLink as your magic wands, letting you interact with your web pages in the most delightful way.

import { test, expect } from '@playwright/test';
import { getText, getHeading, clickLink } from 'plugandplaywright';

test('Checkout the DOM', async ({ page }) => {
await page.goto('https://your-target-website.com/');

// Whisper sweet nothings to your elements
await getText(page, "Find me if you can");
await getHeading(page, "Greetings, mortal");
await clickLink(page, "Follow me");
});