Playwright Beginner Tutorial - How to Record Tests

Playwright Beginner Tutorial - How to Record Tests

Automation Step by Step via YouTube Direct link

Step 2 - Check 2 windows open - Browser and Playwright Inspector

4 of 15

4 of 15

Step 2 - Check 2 windows open - Browser and Playwright Inspector

Class Central Classrooms beta

YouTube videos curated by Class Central.

Classroom Contents

Playwright Beginner Tutorial - How to Record Tests

Automatically move to the next video in the Classroom when playback concludes

  1. 1 Intro
  2. 2 What is Codegen
  3. 3 Step 1 - Open terminal and run codegen *npx playwright codegen*
  4. 4 Step 2 - Check 2 windows open - Browser and Playwright Inspector
  5. 5 Step 3 - Record your test steps and check the test scripts getting created
  6. 6 Step 4 - Save the recorded script in a test file | Run and check
  7. 7 Can also add the url *npx playwright codegen google.com*
  8. 8 See all options *npx playwright codegen --help*
  9. 9 Screenshot moment
  10. 10 Record on a specific browser default:chromium *npx playwright codegen --browser firefox*
  11. 11 Record and save to a file *npx playwright codegen --target javascript -o record_example.js*
  12. 12 Set viewport - screen resolution size *npx playwright codegen --viewport-size=800,600*
  13. 13 Emulate devices *npx playwright codegen --device="iPhone 11"*
  14. 14 Emulate color scheme if available *npx playwright codegen --color-scheme=dark*
  15. 15 Screenshot moment

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.