[PART 1: Installing Node.js – 0:45–2:00]
🎙️ Host (screen share with browser):
“Before we can use Playwright, we need to install Node.js, since Playwright runs on it.”
Steps:
Open your browser
Go to: https://nodejs.org
Download the LTS version (recommended for most users)
🎯 Once installed, open your terminal or command prompt and type:
bash
CopyEdit
node -v
npm -v
“If you see version numbers here, that means Node.js is installed successfully. Great job!”
📁 [PART 2: Create Project & Use npm init playwright@latest – 2:00–4:30]
🎙️ Host (VS Code or terminal view):
“Now let’s create our Playwright project the easy way using the official Playwright initializer.”
Step-by-step:
Create a folder for your project
Example:
bash
CopyEdit
mkdir playwright-js-tutorial
cd playwright-js-tutorial
Now run the magic command:
bash
CopyEdit
npm init playwright@latest
🎯 This command does everything for you!
You’ll see prompts like:
“Do you want to use TypeScript or JavaScript?”
👉 Choose JavaScript
“Where to put tests?”
👉 Just press Enter for the default (tests/)
“Add a GitHub Actions workflow?”
👉 Choose No, unless you know you need it
“Install browsers?”
👉 Say Yes
🚀 Within seconds, Playwright sets up:
Project structure ✅
Test config ✅
Browsers ✅
Sample tests ✅
🧪 [PART 3: Exploring the Generated Project – 4:30–6:00]
🎙️ Host:
“Let’s look at what Playwright created for us.”
🗂 Folder Structure:
tests/example.spec.js → Sample test file
playwright.config.js → Global config (browser, timeout, etc.)
node_modules/ → Installed libraries
package.json → Dependency list
✅ You can start writing tests right away — no extra setup needed!
🧪 [PART 4: Run Your First Test – 6:00–7:30]
🎙️ Host (terminal screen):
“Let’s run the default test and see Playwright in action!”
In your terminal:
bash
CopyEdit
npx playwright test
✅ Output shows test progress:
bash
CopyEdit
Running 1 test using 1 worker
✓ example.spec.js › basic test
🎉 Boom! You just ran your first automated test using Playwright!
📊 [BONUS: View HTML Report – 7:30–8:00]
🎙️ Host:
“Want to see a beautiful visual report of your test results?”
Just run:
bash
CopyEdit
npx playwright show-report
🧠 This opens a browser-based report with detailed logs, screenshots, and more.
🧼 [Optional: Clean Up Sample Test – 8:00–8:30]
🎙️ Host:
“If you want to delete the sample test and start fresh, just remove the example file from the tests/ folder.
We’ll be creating our own tests from the next video onwards!”
🚀 In this video, you’ll learn how to install Node.js and set up a Playwright testing project using JavaScript — the quickest and cleanest way using npm init playwright@latest in 2025.
Whether you’re a total beginner or just trying Playwright for the first time, this tutorial will help you get started fast with real-time explanation, terminal walkthrough, and first test demo.
✅ Topics Covered:
Installing Node.js (LTS)
Running npm init playwright@latest
Choosing JavaScript for setup
Installing Playwright browsers
Running your first Playwright test
Understanding folder structure
Viewing HTML test reports
🔗 Useful Links:
Download Node.js: https://nodejs.org
Official Playwright Docs: https://playwright.dev
📌 Watch Next:
▶️ [Write Your First Playwright Test in JavaScript → Coming Soon]
💬 Got questions? Drop them below — I reply to all!
👍 Like | 🔁 Share | 📌 Save | 🔔 Subscribe for the full 30-part series!
🔍 High-Search SEO Keywords & Hashtags:
🎯 Keywords to include in tags/metadata:
Playwright JavaScript tutorial
Node.js Playwright setup
Install Playwright 2025
playwright npm init tutorial
beginner Playwright automation
Playwright setup JavaScript
E2E testing with Playwright
Playwright first test JavaScript
📢 YouTube Hashtags (Add at end of description):
less
CopyEdit
#Playwright #NodeJS #JavaScriptTesting #EndToEndTesting #PlaywrightTutorial #AutomationTesting #WebAutomation #JavaScriptBeginner #PlaywrightJavaScript