Playwright Beginner Tutorial 5 | How To Record Tests

preview_player
Показать описание

How to record test - Test Generator
Playwright comes with a tool - Codegen also called Test Generator
Can be used to record test and generate test scripts
It Opens 2 windows
A browser window to interacts with the website
Playwright Inspector window to record test

00:00 Intro

01:18 What is Codegen

02:14 Step 1 - Open terminal and run codegen *npx playwright codegen*

03:04 Step 2 - Check 2 windows open - Browser and Playwright Inspector

04:57 Step 3 - Record your test steps and check the test scripts getting created

06:43 Step 4 - Save the recorded script in a test file | Run and check

11:48 See all options *npx playwright codegen --help*

13:33 Screenshot moment

13:54 Record on a specific browser (default:chromium) *npx playwright codegen --browser firefox*

21:27 Set viewport - screen resolution (size) *npx playwright codegen --viewport-size=800,600*

22:52 Emulate devices *npx playwright codegen --device="iPhone 11"*

25:15 Emulate color scheme (if available) *npx playwright codegen --color-scheme=dark*

27:26 Screenshot moment

#playwright #automation #testing
▬▬ CI CD DEVOPS ▬▬

▬▬ UI TESTING ▬▬

▬▬ API TESTING ▬▬

▬▬ MOBILE TESTING ▬▬

▬▬ PERFORMANCE TESTING ▬▬

▬▬ IDE ▬▬

▬▬ PROGRAMMING ▬▬

▬▬ BUILD TOOLS ▬▬

▬▬ SOURCE CODE MANAGEMENT ▬▬

▬▬ CLOUD SERVICES ▬▬

▬▬ DATA FORMATS ▬▬

▬▬ RAGHAV PAL ▬▬
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Every LIKE & SUBSCRIPTION gives me great motivation to keep working for you

You can support my mission for education by sharing this knowledge and helping as many people as you can

If my work has helped you, consider helping any animal near you, in any way you can

NEVER STOP LEARNING
Raghav Pal
Рекомендации по теме
Комментарии
Автор

10:40
11:50 all options of *codegen*
22:27 *viewport-size*

ruixue
Автор

Thanks Raghav for Tutorials, i learnt Javascript, TestCafe from your videos and now started training my teammates. Now learning Playwright

sidhantbhandari
Автор

This is the finest playwright course I've ever come across. Your example is fantastic. Thank you immensely for making many lives easier with your work. Please continue your excellent efforts.

No-Doubt-Channel
Автор

Hey Raghav! You are doing a great job! I am learning playwright from your videos only. Kudos!! Great Content!!!

sabitasharma
Автор

Hey Raghav. I'm new to playwright but your video is clear and easy to understand. Thank you for helping a beginner like me.

NatachaHarivelomandimby
Автор

Thank you so much for the clear and simple explanation with all the details. Your lessons are much better than many courses! You are doing a very useful job and helping a lot of people. God bless you! 🥰

oehiecg
Автор

This is so helpful! Thank you so much for your work!

mahpiyaluta
Автор

Thank you for the videos! They are amazing! Got a 9 on the quiz (made a mistake with the questions about which command to use to run in a specific browser)

elenayaryzhko
Автор

Really good, thank you for this videos👌

carlosalonso
Автор

Code gen is an awesome, Thanks for teaching us, lots of respect From Pakistan.

muhammadabuzar
Автор

Hi Rahav, thank you for this video, the command also worked with single quotes, 'iPhone 11', sharing for information, thanks again.

uvplays
Автор

Recently addicted to your videos and got 8 out of 10 in quiz

ngayathri
Автор

Easy to understand. Score 9/10 in quiz.

sagarikamandal
Автор

Thank you for making these. I think your videos would be improved if you avoided getting caught up explaining stuff which is extraneous to the main topic of the video. For instance, in this video you took about a minute to explain how to split application windows both in Windows OS and Mac OS. In the last video you also got hung up explaining multiple different syntaxes in javascript for import modules.

ArnoDunstatter-polv
Автор

Hi Raghav! Your videos have always been very helpful for the QA community.. keep doing the amazing work.Thank you for your videos.
I wanted to know if playwright along with any emulator can be used to automate mainframe application? Or is there any other tool in the market which can help automate a mainframe application?

anushkachanchal
Автор

Hi Raghav, your videos are so useful for me, many thanks. One question: which tool do you use in your presentations? (To point, to zoom, etx). Thanks in advance

Kissisamisa
Автор

you can also use auto-complete for other commands like playwright, not just dir paths

emanuilkostadinov
Автор

Hi raghav, this is amazing content for of all, really apprciate this. I just have a small question, what keyboard short cut are you using to call a file into your command for example when using npx playwright test how are you able to get a file name in this blank section without typing manually?

anuboga
Автор

@RaghavPal
Hi Raghav,

Thanks for creating easy videos and sharing knowledge.
I would like to bring to your attention when we follow the same folder and file structure as you show in the video. Upon executing the below command through the terminal

npx playwright test .\tests\record1.spec.js --project=chromium --headed

we get Error: No tests found

To successfully execute the tests we should enter the command as below in the Terminal
npx playwright test .\\tests\\record1.spec.js --project=chromium --headed

Hope this helps the next one who encounters the same error.

Cheers, JB

connectjb
Автор

Hi Raghav! your tutorials make our lives very easy indeed! I have a question, can we create a dashboard using Playwright, like the way we create for cypress? Also can you plz provide some guidance about adding Playwright into Circle CI?

asmarazaq