Summary
Keywords
Full Transcript
Step 1 - Create a new file under test folder Step 2 - Add module ‘playwright/test’ const { test, expect } = require('@playwright/test'); ** test, expect ------ functions from @playwright/test module Playwright Test provides a test function to declare tests and expect function to write assertions Step 3 - Create a test block - test(title, testFunction) The keyword 'async' before a function makes the function return a promise The keyword 'await' before a function makes the function wait for a promise Step 4 - Run the test npx playwright test --project=chromium --headed FirstTest.spec.js npx playwright test runs all tests on all browsers in headless mode npx playwright test MyTest1.spec.js runs a specific test file npx playwright test MyTest1.spec.js MyTest2.spec.js runs the files specified npx playwright test -g "test title" runs test with the title npx playwright test --project=chromium runs on specific browser npx playwright test --headed runs tests in headed mode npx playwright test --debug debug tests npx playwright test example.spec.js --debug debug specific test file ######################################### 🚀 Udemy Courses 👨💻👩💻 ########################################## 🟢 Playwright with TypeScript 🎭📘 👉 https://www.udemy.com/course/learn-playwright-web-api-testing-with-typescript/ 🟡 Playwright with JavaScript 🎭📒 👉 https://www.udemy.com/course/learn-playwright-with-javascript 🤖 Generative AI for Software Testing 🧠💡 👉 https://shorturl.at/Uk2eM 🧪 Manual Testing + Agile with Jira Tool 📋⚙️ 👉 https://www.udemy.com/course/learn-manual-software-testing-with-live-project-jira-tool 💻 Selenium with Java + Cucumber 🥒☕ 👉 https://www.udemy.com/course/learn-selenium-with-java-live-project 🐍 Selenium with Python & PyTest 🐍🧪 👉 https://www.udemy.com/course/learn-selenium-with-python-d/ 🤖 Selenium with Python using Robot Framework 🤖📐 👉 https://www.udemy.com/course/learn-selenium-with-python-using-robot-framework 🔌 API Testing (Postman, RestAssured & SoapUI) 🔍🔧 👉 https://www.udemy.com/course/learn-selenium-with-python-using-robot-framework/ 🌐 Web & API Automation using Cypress with JavaScript 💻🧬 👉 https://www.udemy.com/course/learn-cypress-with-typescript/ 📊 JMeter - Performance Testing 🚀📈 👉 https://www.udemy.com/course/learn-jmeter-m/learn/ 🧩 SDET Essentials (Full Stack QA) 🧠🔍 👉 https://www.udemy.com/course/learn-sdet-essentials/ 📱 Appium - Mobile Automation Testing 📲🧪 👉 https://www.udemy.com/course/learn-appium-latest-1110-mobile-automation-testing/ ☕ Java Collections 📚🔄 👉 https://www.udemy.com/course/learn-java-collections/ 🥒 Cucumber BDD Framework 📘💬 👉 https://www.udemy.com/course/learn-cucumber-bdd-framework 🛠️ Protractor with JavaScript 🔧📐 👉 https://www.udemy.com/course/learn-protractorangular-testing-with-javascript/
