Playwright with Javascript | How To Create and Run Tests | Part 3

SDET- QA β€’ May 25, 2023
Video Thumbnail

About

No channel description available.

Video Description

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/

You May Also Like