Playwright Beginner Tutorial 1 | What is Playwright

  Рет қаралды 225,543

Automation Step by Step

Automation Step by Step

Күн бұрын

▬ ALL FREE COURSES ► automationstepbystep.com/
▬ ASK RAGHAV ► bit.ly/2CoJGWf
▬ QUIZ - forms.gle/oQJeKFZgnHx8Y3it9
▬▬ T I M E S T A M P S ⏰ ▬▬
00:00 Introduction
01:39 What is Playwright
02:01 Applications supported
02:12 Languages supported
03:00 Browsers supported
04:44 OS supported
06:45 Screenshot moment
07:01 Features of Playwright
08:56 Some more features
12:21 All feature list Screenshot moment
#playwright #automation #testing
▬▬▬▬ CI CD DEVOPS ▬▬▬▬
JENKINS BEGINNER ► bit.ly/2MIn8EC
JENKINS TIPS & TRICKS ►bit.ly/2LRt6xC
JENKINSFILE ► bit.ly/3JSMSZ7
DOCKER ► bit.ly/2MInnzx
KUBERNETES ► bit.ly/2MJIlMK
▬▬▬▬ UI TESTING ▬▬▬▬
SELENIUM BEGINNERS ► bit.ly/2MGRS8K
SELENIUM JAVA FRAMEWORK ► bit.ly/2N9xvR6
SELENIUM PYTHON ► bit.ly/2oyMp5x
SELENIUM TIPS ► bit.ly/2owxc50
SELENIUM BUILDER ► bit.ly/2MKNtlq
SELENIUM 4 ► bit.ly/3AiJOlP
KATALON STUDIO ► bit.ly/2wARFdi
ROBOT FRAMEWORK with RIDE ► bit.ly/2Px6Ue9
ROBOT FRAMEWORK with Eclipse► bit.ly/2N8DZxb
PROTRACTOR ► bit.ly/2KtqVkU
ACCELQ ► bit.ly/3PlsAsh
TEST PROJECT ► bit.ly/2DRNJYE
CUCUMBER BDD ► bit.ly/3Cnno4z
CYPRESS ► bit.ly/3PpEukM
XPATH & WEB LOCATORS ► bit.ly/3PpEvoQ
▬▬▬▬ API TESTING ▬▬▬▬
WEB SERVICES (API) ► bit.ly/2MGafL7
SOAPUI ► bit.ly/2MGahmd
POSTMAN ► bit.ly/2wz8LrW
POSTMAN 2022 ► bit.ly/3JWm4qX
JMETER API TESTING ► bit.ly/3AgVPar
GENERAL ► bit.ly/2PYdwmV
KATALON STUDIO API ► bit.ly/2BwuCTN
REST ASSURED ► bit.ly/3zUdhRD
KARATE API ► bit.ly/3w3H5Ku
API MOCKING ► bit.ly/3bYPsjS
▬▬▬▬ MOBILE TESTING ▬▬▬▬
APPIUM ► bit.ly/2ZHFSGX
MOBILE TESTING ►bit.ly/2PxpeUv
▬▬▬▬ PERFORMANCE TESTING ▬▬▬▬
JMETER BEGINNER ► bit.ly/2oBbtIU
JMETER INTERMEDIATE ► bit.ly/2oziNVB
JMETER ADVANCED ► bit.ly/2Q22Y6a
JMETER TIPS & TRICKS ► bit.ly/2NOfWD2
PERFORMANCE TESTING ► bit.ly/2wEXbLS
GATLING ► bit.ly/3QrWfkV
▬▬▬▬ IDE ▬▬▬▬
ECLIPSE ► bit.ly/3AnRhQP
INTELLIJ IDEA ► bit.ly/3AnyDZ8
Visual Studio Code ► bit.ly/2V15yvt
▬▬▬▬ PROGRAMMING ▬▬▬▬
JAVA BEGINNERS ► bit.ly/2PVUcXs
JAVA TIPS & TRICKS ► bit.ly/2CdcDnJ
GROOVY ► bit.ly/2FvWV5C
JAVASCRIPT ► bit.ly/2KJDZ8o
TYPESCRIPT ► bit.ly/3dvJBmz
PYTHON ► bit.ly/2Z4iRye
RUBY ► bit.ly/3JRRmzf
▬▬▬▬ BUILD TOOLS ▬▬▬▬
MAVEN ► bit.ly/2NJdDRS
GRADLE ► bit.ly/30l3h1B
▬▬▬▬ SOURCE CODE MANAGEMENT ▬▬▬▬
GIT & GITHUB ►bit.ly/2Q1pagY
GITLAB ► bit.ly/2kQPGyQ
▬▬▬▬ CLOUD SERVICES ▬▬▬▬
BROWSERSTACK ► bit.ly/3w7kxZn
SAUCELABS ► bit.ly/3w7kAo1
LAMBDATEST ► bit.ly/3C6TBwM
▬▬▬▬ DATA FORMATS ▬▬▬▬
JSON ► bit.ly/3w450tq
XML ► bit.ly/3PqRneH
▬▬▬▬ VIRTUALIZATION ▬▬▬▬
VIRTUALIZATION ON WINDOWS ► bit.ly/2SItIL9
▬▬▬▬ MOCK INTERVIEWS ► bit.ly/3QGwwVJ ▬▬▬▬
▬▬▬▬ OTHERS ▬▬▬▬
REDIS ►bit.ly/2N9jyCG
MISC ► bit.ly/2Q2q5xQ
TOOLS & TIPS ► bit.ly/2oBfwoR
QnA FRIDAY ► bit.ly/2NgwGpw
SUNDAY SPECIAL ► bit.ly/2wB23BO
▬▬▬▬ RAGHAV PAL ▬▬▬▬
UDEMY ► www.udemy.com/user/raghav-pal-3/
GITHUB PROJECTS ► github.com/Raghav-Pal/
CORPORATE TRAINING ► automationstepbystep.com/corp...
STORIES BY RAGHAV ► automationstepbystep.com/stor...
MY UDEMY COURSES ► automationstepbystep.com/udem...
TWITTER ► / learnwithraghav
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
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

Пікірлер: 375
@dillydally7327
@dillydally7327 Жыл бұрын
I've been a manual qa tester for a fintech company for a year or so, I want to transition to automation and watching your videos will be a great start, thank you so much. I will binge watch your videos lol.
@RaghavPal
@RaghavPal Жыл бұрын
Great to hear that, All the best, If you face any issues, pls ask in the comment section
@satyadurgadeviv503
@satyadurgadeviv503 Жыл бұрын
You have heard my heart ,we started using this for our application recently and first thing I did is searching ur videos.Good that you started thank you so much
@RaghavPal
@RaghavPal Жыл бұрын
Glad I could help Satya
@SarangHoley
@SarangHoley Жыл бұрын
Really excited for this series, Thanks @Raghav for getting it starts. Much Awaited 😊👍
@RaghavPal
@RaghavPal Жыл бұрын
Hope you enjoy it Sarang
@ramutalari8473
@ramutalari8473 Жыл бұрын
Much awaited one. Thank You @Raghav for starting this series!!
@RaghavPal
@RaghavPal Жыл бұрын
Most welcome Ramu
@soumitakar8459
@soumitakar8459 Жыл бұрын
Your playwright series has been very helpful. Thank you.
@RaghavPal
@RaghavPal Жыл бұрын
Most welcome Soumita
@TheMMakif
@TheMMakif Жыл бұрын
Thank you once again for your excelent teaching methods. I beleive I'll learn playwright very well in a couple of days by the help of your videos👍
@RaghavPal
@RaghavPal Жыл бұрын
Most welcome Akif
@thinkholisticwellness
@thinkholisticwellness 6 ай бұрын
Raghav is indeed a great teacher. He goes from zero to hero! Thank you, you have helped the lives of so many people. God Bless every step! you take
@RaghavPal
@RaghavPal 6 ай бұрын
So nice of you
@santielaing939
@santielaing939 Жыл бұрын
Clear and to the point. Thank you Raghav!
@RaghavPal
@RaghavPal Жыл бұрын
Most welcome Santie
@tranhuudan4550
@tranhuudan4550 Жыл бұрын
I am from Viet Nam and just started learning Playwright. Your all videos are beneficial for me. Thank you so much. Keep going, bro.
@RaghavPal
@RaghavPal Жыл бұрын
Most welcome Trần
@3aadel
@3aadel Жыл бұрын
That's a great tutorial introduction for Playwright ! many thanks Raghav
@RaghavPal
@RaghavPal Жыл бұрын
Most welcome
@hasibrahat9609
@hasibrahat9609 Жыл бұрын
Awaited for this one, Thanks!
@RaghavPal
@RaghavPal Жыл бұрын
most welcome Hasib
@rosya.traveler4269
@rosya.traveler4269 Жыл бұрын
I like the way you teach. thank you for doing it step by step. Making it easy for us to follow and understand.
@RaghavPal
@RaghavPal Жыл бұрын
You're very welcome Rosy
@aisuluuturganbaeva492
@aisuluuturganbaeva492 3 ай бұрын
I just fount your channel , and already loving it ! Thank you Raghav
@RaghavPal
@RaghavPal 3 ай бұрын
Most welcome Aisuluu
@sreekalapm2588
@sreekalapm2588 Жыл бұрын
Thank you Raghav, I have started and became professional in sdet career with your guidance.. Many thanks to you for helping the community
@RaghavPal
@RaghavPal Жыл бұрын
Most welcome Sreekala. All the best for your career. Do share your knowledge and help others
@Arasuari
@Arasuari Жыл бұрын
Thank you very much for considering my comment and uploading playwright series🙏❤️
@RaghavPal
@RaghavPal Жыл бұрын
Most welcome
@Shwetank0512
@Shwetank0512 Жыл бұрын
Fan ho gaya mai 🙏.... You covered so many topics and varaiety of tools with indepth skills. After following detailed steps we are able to do practically........ Jai ho Mordern time GURU 🙏
@RaghavPal
@RaghavPal Жыл бұрын
Thanks for the kind words Shwetank. Humbled
@aysanaaskarova1676
@aysanaaskarova1676 Жыл бұрын
Thank uuuuuuuuu❤🎉 U are awesome 💐 Good luck, it’s very helpful and interesting sessions ❤
@RaghavPal
@RaghavPal Жыл бұрын
Most welcome Aysana
@kpopbhavyaa8127
@kpopbhavyaa8127 14 күн бұрын
Thank you Raghav 😊 Got when much needed 🙏
@RaghavPal
@RaghavPal 14 күн бұрын
Most welcome
@parthipan872
@parthipan872 Жыл бұрын
Thanks for you for your effort on playwright playlist. We are waiting for more videos till framwork and most of the features
@RaghavPal
@RaghavPal Жыл бұрын
Will upload soon
@henrynwosu6277
@henrynwosu6277 Жыл бұрын
Wow! Thank you so much sir! Helpful Is an understatement. God bless you.
@RaghavPal
@RaghavPal Жыл бұрын
You are most welcome
@ayeshakhalid709
@ayeshakhalid709 Жыл бұрын
Yrr. This Hello this is raghav is like every where. Whenever I try to learn any new framework. I'm scared if I would get want familiar trainer but now I shouldn't after seeing you on playwright. Good to see you working so hard
@RaghavPal
@RaghavPal Жыл бұрын
Thanks for watching Ayesha
@surajkamble3538
@surajkamble3538 7 ай бұрын
Thank you Raghav sir for this Playwrite tutorials 🤝👍💐
@RaghavPal
@RaghavPal 7 ай бұрын
Most welcome Suraj
@Summer___________
@Summer___________ Ай бұрын
First search for playwright and I found you I am a manual tester and my company is switching to automation and this is what they are planning to use . I hope this will help me achieve my goals. Thank you
@RaghavPal
@RaghavPal Ай бұрын
Welcome aboard.. yes this should help you and let me know if you face any issues
@Summer___________
@Summer___________ Ай бұрын
@@RaghavPal thank you 🙏🏽
@jarver9956
@jarver9956 6 ай бұрын
Thanks for this free tutorial :) appreciate a lot
@RaghavPal
@RaghavPal 6 ай бұрын
You're very welcome Jarver
@zwiterrion12
@zwiterrion12 3 ай бұрын
Thanks for the useful tutorial, and simple to understand. Quiz result 10/10
@RaghavPal
@RaghavPal 3 ай бұрын
Glad it helped Kelly
@msdynamics365cecrmknowledg9
@msdynamics365cecrmknowledg9 Жыл бұрын
Really great tutorial for Playwright . Many many thanks Raghav ji.
@RaghavPal
@RaghavPal Жыл бұрын
Always welcome
@jaithomas5663
@jaithomas5663 Жыл бұрын
Thanks🥺....much needed one ,, when we expect the next video
@RaghavPal
@RaghavPal Жыл бұрын
Thanks all the videos are already published can check here AutomationStepByStep.com
@andre-le-bone-aparte
@andre-le-bone-aparte Жыл бұрын
Just found your channel. Excellent Content - Another Sub For You Sir!
@RaghavPal
@RaghavPal Жыл бұрын
Thanks a lot
@sandhyakoduru6856
@sandhyakoduru6856 5 ай бұрын
Well explained and making easy to understand fir beginners in automation
@RaghavPal
@RaghavPal 5 ай бұрын
Thanks a lot Sandhya
@Kaiser0109
@Kaiser0109 Жыл бұрын
Thank you Bro very good explanation!
@RaghavPal
@RaghavPal Жыл бұрын
Glad it was helpful!
@me.nilesh
@me.nilesh Жыл бұрын
Thanks for starting this series.
@RaghavPal
@RaghavPal Жыл бұрын
Most welcome Nilesh
@me.nilesh
@me.nilesh Жыл бұрын
@@RaghavPal Please start playwright with Java framework. It could be help us.
@RaghavPal
@RaghavPal Жыл бұрын
I will do Nilesh
@AIRobotica
@AIRobotica Жыл бұрын
Thanks Sirji...🙏
@RaghavPal
@RaghavPal Жыл бұрын
Most welcome
@olaojeyinka9361
@olaojeyinka9361 Жыл бұрын
Hi @Raghav, Thank you so much for this tutorial. When are you going to do the video on the page object model for this playlist?
@RaghavPal
@RaghavPal Жыл бұрын
I will plan in some time
@olaojeyinka9361
@olaojeyinka9361 Жыл бұрын
Hi @Raghav, when I ran this command npx playwright test .\tests\AnnotationsAndTags.spec.js --project=chrome --grep "@smoke", I got the attached error " Running 0 tests using 0 workers Error: Requiring @playwright/test second time, First: Error: at Object. (C:\Users\oluse\OneDrive\Desktop\Playwright ode_modules\@playwright\test\lib\index.js:64:33) at Module._compile (node:internal/modules/cjs/loader:1105:14) at Module._extensions..js (node:internal/modules/cjs/loader:1159:10) at Object.t..tu._extensions. [as .js] (C:\Users\oluse\OneDrive\Desktop\Playwright ode_modules\@playwright\test\lib\utilsBundleImpl.js:16:1010) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object. (C:\Users\oluse\OneDrive\Desktop\Playwright ode_modules\@playwright\test\index.js:17:13) at Module._compile (node:internal/modules/cjs/loader:1105:14) at Module._extensions..js (node:internal/modules/cjs/loader:1159:10) at Object.t..tu._extensions. [as .js] (C:\Users\oluse\OneDrive\Desktop\Playwright ode_modules\@playwright\test\lib\utilsBundleImpl.js:16:1010) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) Second: at Object. (C:\Users\oluse\OneDrive\Desktop\Playwright\tests ode_modules\@playwright\test\lib\index.js:59:11) at Object. (C:\Users\oluse\OneDrive\Desktop\Playwright\tests ode_modules\@playwright\test\index.js:17:13) at Object. (C:\Users\oluse\OneDrive\Desktop\Playwright\tests\AnnotationsAndTags.spec.js:3:13)". Kindly assist
@SahilRajput03
@SahilRajput03 8 ай бұрын
bhot awesome!!
@RaghavPal
@RaghavPal 8 ай бұрын
Thanks Sahil
@yarahman72
@yarahman72 Жыл бұрын
Hi Raghav, I really appreciate all your efforts in teaching Playwright. Really help and awesome videos to learn and automate using playwright. I am able to successfully write and run end to end test cases using Playwright. I have question in relation to how to use a test data sheet and link it to a test case. For example, I have a bunch of customers details for which I want to use the test case to use and execute the same test cases for various test data in the spreadsheet. Can you please provide some details around how to create a test data and associate the same to the test case.
@RaghavPal
@RaghavPal Жыл бұрын
Hi Rahman, You can link test data to test cases in Playwright using a spreadsheet or a CSV file. You can store test data in a spreadsheet, with each row representing a set of test data, and then read that data in your test cases. Eg: const fs = require('fs'); const csv = require('csv-parser'); const results = []; fs.createReadStream('testdata.csv') .pipe(csv()) .on('data', (data) => results.push(data)) .on('end', () => { for (const data of results) { describe(`Test for ${data.username}`, () => { it('test case 1', async () => { // Use data in test case }); }); } }); This code uses the fs module to read the CSV file, the csv-parser library to parse the data, and the describe and it functions from Mocha to define test cases. You can modify this code to fit your specific requirements. The describe function allows you to group test cases, while the it function allows you to define individual test cases. In each test case, you can use the data from the data object to perform tests.
@Floweenka
@Floweenka Жыл бұрын
very understandable, thank you
@RaghavPal
@RaghavPal Жыл бұрын
You're very welcome
@user-wz7om5un5c
@user-wz7om5un5c 10 ай бұрын
Thank you again for this series, very useful and very easy to follow. Currently we use Jest to do component-testing. Is it possible to do component testing with Playwright?
@RaghavPal
@RaghavPal 10 ай бұрын
Nicolae Yes, it is possible to do component testing with Playwright. Playwright has a built-in feature for component testing, which was introduced in version 1.22.0. To use Playwright for component testing, you need to create a test script that imports and tests your components. You can use the `mount()` method to mount the component to the DOM and then interact with the component using Playwright's methods. Here is an example of a Playwright component test script: ``` import { test, expect } from '@playwright/test'; import { MyComponent } from './MyComponent'; test('MyComponent should render correctly', async () => { const component = await test.mount(MyComponent); expect(component).toBeInTheDocument(); expect(component).toHaveTextContent('Hello, world!'); }); ``` To run the component test script, you can use the following command: ``` npx playwright test ``` Playwright will run the test script and generate a report. The report will show you whether the test passed or failed, as well as any errors that occurred. Playwright component testing is still under development, but it is already a powerful tool for testing React components. Playwright provides a number of features that make it a good choice for component testing, such as: *Support for multiple browsers.* Playwright supports a variety of browsers, including Chromium, Firefox, and WebKit. This allows you to test your components in multiple browsers without having to write separate tests for each browser. *Parallel execution.* Playwright can run tests in parallel, which can significantly reduce the time it takes to run your tests. *Reporting.* Playwright generates a report that shows you the results of your tests. The report includes information such as whether the test passed or failed, as well as any errors that occurred. If you are looking for a tool to test your React components, Playwright is a good option to consider. It is a powerful tool that provides a number of features that make it a good choice for component testing. I hope this helps
@monushh
@monushh Жыл бұрын
Thanks Raghav. Scored 8/10
@RaghavPal
@RaghavPal Жыл бұрын
Great
@DeepakRai
@DeepakRai Ай бұрын
Great session
@RaghavPal
@RaghavPal Ай бұрын
Thanks Deepak
@aylinbekem3701
@aylinbekem3701 3 ай бұрын
Thanks, Raghav 🤩
@RaghavPal
@RaghavPal 3 ай бұрын
Most welcome Aylin
@tamilulagam9012
@tamilulagam9012 6 ай бұрын
Raghav Pal s the most talented and soft spoke person i have seen i this world. One day i will take selfie with real hero like you ❤❤❤
@RaghavPal
@RaghavPal 6 ай бұрын
Thanks for the kind words Tamil... humbled
@m.detagianfaiz6253
@m.detagianfaiz6253 Жыл бұрын
i think playwright is know well for QA Engineer Struggle while testing. Playwright build in next level in framework👍
@RaghavPal
@RaghavPal Жыл бұрын
Yes, it is good
@mahaboobsabmaniyar7363
@mahaboobsabmaniyar7363 Жыл бұрын
Thank you sir
@RaghavPal
@RaghavPal Жыл бұрын
Most welcome
@IfNotMe
@IfNotMe 9 ай бұрын
Thank you very much Sir
@RaghavPal
@RaghavPal 8 ай бұрын
Most welcome
@RajJey667
@RajJey667 Жыл бұрын
Thanks Ragav for this video :). A generic query, Is playwright right tool for the web application automation built on REACT software? Please answer
@RaghavPal
@RaghavPal Жыл бұрын
Hi, Yes, Playwright can be a good option for automating web applications built on React, as it is a modern and flexible tool that supports multiple browsers and operating systems Playwright was specifically designed to handle the challenges of modern web development, such as single-page applications and web components, which are often used in React applications Other options for web application automation built on React include: Cypress: A popular open-source tool for end-to-end testing of web TestCafe: Another open-source testing tool, TestCafe can be used for automated testing of web applications built on React, as well as other frameworks. Selenium: As mentioned earlier, Selenium is a widely-used tool for web automation and can also be used to automate web applications built on React. Puppeteer: Puppeteer is a Node.js library that provides a high-level API for automating Chrome and other Chromium-based browsers. It can be used to automate web applications built on React. Ultimately, the choice of tool depends on your specific requirements, such as the type of application you are testing, the programming language you prefer, and the level of expertise you have with a particular tool. I have created a video on Playwright vs Cypress here - kzbin.info/www/bejne/mZrbnIR-g9CikJY
@sankaranarayanan5700
@sankaranarayanan5700 Жыл бұрын
Hi @Raghav I tried Playwright Java installation as per the documentation, However I am facing untrusted local certificate issue when the example code tries to download the browser binaries. Can you please help ?
@RaghavPal
@RaghavPal Жыл бұрын
Hi Sankara, I will upload the installation steps video tomorrow, can check again with that
@MindClef
@MindClef Жыл бұрын
Hi @Raghav Thank you very much for the tutorial. Can we do Database testing using playwright? Ex:-Connect to DB , run query and verify the results
@RaghavPal
@RaghavPal Жыл бұрын
Playwright is used for testing on browsers, so I believe it will not be an ideal tool for database testing in specific
@snehaajay8848
@snehaajay8848 4 ай бұрын
I got 9/10 in quiz. very clear n good explanation thank you @Raghav
@RaghavPal
@RaghavPal 4 ай бұрын
Well done Sneha
@falgunichauhan8887
@falgunichauhan8887 Жыл бұрын
Hi @Raghav I watch your videos, they are so easy to understand. Would like you to make a video on playwright (java) with cucumber framework. Thanks for these wonderfull sessions.
@RaghavPal
@RaghavPal Жыл бұрын
I will plan Falguni
@tarunpatel05
@tarunpatel05 Жыл бұрын
Hi Raghav, thanks for this session, Which language binding will you use in this tutorial?
@The4m3r
@The4m3r Жыл бұрын
Same question from me?
@RaghavPal
@RaghavPal Жыл бұрын
Will start with JavaScript
@The4m3r
@The4m3r Жыл бұрын
@@RaghavPal That is great thank you.
@PraveenKumarNS
@PraveenKumarNS Жыл бұрын
Hi Raghav, Thanks for this series. Please answer my doubt: I have an application built using angular and typescript. Can we use playwright to automate angular application with Java OR is it mandatory to use Javascript in playwright?
@RaghavPal
@RaghavPal Жыл бұрын
Hi, you can use Playwright with Java
@Itsourfamilys
@Itsourfamilys Жыл бұрын
Hi Raghav , I see lot of changes going on from selenium end which is better and good in market right now ? Do we need to shift from selenium ?
@RaghavPal
@RaghavPal Жыл бұрын
Selenium is still a very popular automation testing framework, but there are a number of new frameworks that are gaining popularity. Some of the most popular alternatives to Selenium include: * **Cypress:** Cypress is a newer framework that is known for its speed and reliability. It is also very easy to learn and use. * **Playwright:** Playwright is a newer framework that is based on WebDriver. It is known for its flexibility and its ability to automate a wide range of web applications. * **Appium:** Appium is a framework that can be used to automate both web and mobile applications. It is a good choice for automating applications that are developed using different platforms. Whether or not you need to shift from Selenium depends on your specific needs. If you are happy with Selenium and it is meeting your needs, then there is no need to switch. However, if you are looking for a newer framework that is faster, more reliable, or easier to use, then you may want to consider one of the alternatives. Here are some factors to consider when deciding whether or not to switch from Selenium: * The type of applications that you need to automate. * The skills and experience of your team. * Your budget. If you are not sure whether or not to switch from Selenium, I recommend that you do some research and try out some of the alternative frameworks. You can also talk to other automation engineers to get their recommendations. I hope this helps!
@pandutadavarthy8332
@pandutadavarthy8332 Жыл бұрын
Hi Raghav what is impact of playwright is going to create change in Test Automation and carrier scope
@RaghavPal
@RaghavPal Жыл бұрын
Playwright has really good features and will be a good skill set to acquire Pandu
@joeypublik
@joeypublik Жыл бұрын
Hello, First I would like to thank you for your work because you help people to be more efficient in their work, which is highly commendable. THANK YOU. Second I would like to ask... Does Playwright can fill a web formulary getting data from a csv file or Excel file? I am more interested getting data from Excel or Calc (LibreOffice) files to fill web formularies. Are you going to make a video about this interesting point? This is a good subject for those who want to save time doing a tedious work. Please think about it. I suggest to do it or talk about that point. You will help many people to be more efficient. Many thanks
@RaghavPal
@RaghavPal Жыл бұрын
Hi Joey, Yes, Playwright can fill a web formulary by getting data from a CSV file, Excel file, or other data sources. You can use the Playwright API to read data from CSV or Excel files and then populate the web form fields with the data. Here's an example of how you can read data from an Excel file using the xlsx package and then use it to fill in a web form using Playwright: const xlsx = require('xlsx'); const { chromium } = require('playwright'); (async () => { // Load data from Excel file const workbook = xlsx.readFile('data.xlsx'); const worksheet = workbook.Sheets['Sheet1']; const data = xlsx.utils.sheet_to_json(worksheet); // Launch a browser const browser = await chromium.launch(); const context = await browser.newContext(); // Navigate to a web page with a form const page = await context.newPage(); await page.goto('www.example.com/form'); // Fill in the form with data from the Excel file for (let i = 0; i < data.length; i++) { const row = data[i]; await page.fill('#input1', row['Field1']); await page.fill('#input2', row['Field2']); await page.fill('#input3', row['Field3']); await page.click('#submit-button'); await page.waitForNavigation(); } // Close the browser await browser.close(); })(); In this example, the xlsx package is used to read data from an Excel file named data.xlsx. The worksheet variable contains the data from the Sheet1 worksheet in the Excel file. The sheet_to_json method is used to convert the worksheet data into a JSON object. The Playwright API is then used to launch a Chromium browser, navigate to a web page with a form, and fill in the form fields with data from the Excel file. The fill method is used to populate the form fields, and the click method is used to submit the form. The waitForNavigation method is used to wait for the page to reload after the form is submitted. Finally, the browser is closed using the close method. You can modify this code to read data from a CSV file or other data sources as needed.
@olaojeyinka9361
@olaojeyinka9361 Жыл бұрын
@RaghavPal, I have a question for you, which automation tool can I use for developing an automation framework for Microsoft Dynamics SL. It does not have a URL. It is remote access.
@RaghavPal
@RaghavPal Жыл бұрын
Microsoft Dynamics SL is an enterprise resource planning (ERP) software that is typically accessed via remote access and does not have a URL There are a few automation tools that you can use to develop an automation framework for Microsoft Dynamics SL, like: WinAppDriver WinAutomation Sikuli Microsoft Dynamics GP Automation Library Microsoft UI Automation It will be a good idea to consult with a developer experienced with Microsoft Dynamics SL and automation testing to help you choose the best tool for your needs
@olaojeyinka9361
@olaojeyinka9361 Жыл бұрын
@@RaghavPal thank you very much.
@vigneshngws6684
@vigneshngws6684 Жыл бұрын
Hello, Raghav we need security testing or penetration testing series.
@RaghavPal
@RaghavPal Жыл бұрын
I will plan on that Vignesh
@alim241081
@alim241081 Жыл бұрын
Hi Raghav, what would be the future of this tool.is this overtake selenium
@RaghavPal
@RaghavPal Жыл бұрын
Hi Alim, Playwright has very good features and is useful in Automation, Selenium is here since a long time and has a huge community, So it may not be right to compare these 2 I will suggest that you learn the skills and then decide what works best for you
@alim241081
@alim241081 Жыл бұрын
@@RaghavPal ,Thanks for your reply.just make vedio of comparision for Sel vs Playright that would be useful.
@mohbib360
@mohbib360 Жыл бұрын
Thank you Raghaf for this tutos, i have a question, is playwright compatible with desktop application ?
@RaghavPal
@RaghavPal Жыл бұрын
Yes, Playwright is compatible with desktop applications. While Playwright is primarily known for its web automation capabilities, it also supports automating desktop applications across different platforms. Playwright provides a unified API that allows you to automate web browsers (Chrome, Firefox, WebKit) as well as desktop applications using the same programming language and codebase. It supports automating desktop applications on Windows, macOS, and Linux. To automate desktop applications using Playwright, you would typically use the appropriate API methods and functions provided by Playwright for interacting with the user interface elements, performing actions, and retrieving information from the application. Here's a high-level example of automating a desktop application with Playwright: ```javascript const { chromium } = require('playwright'); (async () => { const app = await chromium.launch(); const context = await app.newContext(); const page = await context.newPage(); // Navigate to the desktop application await page.goto('your-desktop-app-url'); // Perform actions on the application, e.g., clicking buttons, filling forms, etc. await page.click('#button-id'); await page.fill('#input-field-id', 'Hello, World!'); // Retrieve information from the application, e.g., reading text, getting values, etc. const labelText = await page.innerText('#label-id'); console.log('Label Text:', labelText); await app.close(); })(); ``` This is just a basic example, and the specific methods and APIs you use will depend on the desktop application and its UI framework. Playwright supports popular UI frameworks like Win32, WPF, UWP on Windows, and Cocoa on macOS. By leveraging Playwright's cross-browser and cross-platform capabilities, you can write automation scripts that cover both web and desktop applications, providing a unified testing experience
@shubhankarh5132
@shubhankarh5132 Жыл бұрын
Hi Raghav, does playwright supports both desktop based and web based applications? as the application which I work, runs on both desktop based and web based application.
@RaghavPal
@RaghavPal Жыл бұрын
Hi Shubhankar, Yes, Playwright does support both desktop-based and web-based applications. Playwright is a Node.js library that enables you to automate both web and desktop applications. It supports automating applications built on various desktop platforms, such as Windows, macOS, and Linux, as well as popular web browsers, such as Chromium, Firefox, and Safari. In addition, Playwright provides a simple and concise API for automating desktop applications using the same set of commands that are used for automating web applications. This makes it easy to write tests that cover both desktop and web applications, without having to switch between different tools or APIs.
@dineshpentakota1514
@dineshpentakota1514 11 ай бұрын
Hii Sir,I tried to add to add karate gatling reports to prometheus and grafana through datawriter concept add to gatling.conf but i cant see results if possible plz make a video on that .
@RaghavPal
@RaghavPal 11 ай бұрын
Will plan on it Dinesh
@Anto-fz2kw
@Anto-fz2kw 6 ай бұрын
my score 8/10. thank
@RaghavPal
@RaghavPal 6 ай бұрын
well done...
@kalyankumar3096
@kalyankumar3096 Жыл бұрын
Hi Raghav it is possible to create framework using playwright. using testNg and playwright combination
@RaghavPal
@RaghavPal Жыл бұрын
hi Kalyan, you can use, can find some online resources on this
@babjigandi9548
@babjigandi9548 Жыл бұрын
Hi Raghav, Just started watching your videos and nice explanation by the way.I have my Java GUI application and I wanted to automate it to have regression test for future releases. It's a java swing application. My software completely exists in Docker and that's how we deliver it to our customers. Do you think playwright is suitable for my GUI application? I hope you answer my question and also is it possible to write BDD test cases in playwright? Thank you.
@RaghavPal
@RaghavPal Жыл бұрын
Hi Babji, Playwright is a tool for automating browser-based applications, but it can also be used for automating GUI applications that run in a web browser. If your Java GUI application is accessible through a web browser, then Playwright might be suitable for automating it. As for writing BDD (behavior-driven development) test cases in Playwright, it is possible to write tests using the Gherkin syntax and the cucumber-js library. This allows you to write tests in a natural language format that is readable by both technical and non-technical stakeholders.
@mouthecutest
@mouthecutest Жыл бұрын
Hi Raghav, can you please explain how oops concept is applicable in the page object model framework you designed here? Also is it necessary to make the locators private as Javascript do not have any reserved keyword as Private?
@RaghavPal
@RaghavPal Жыл бұрын
Hi Moumita, In the Page Object Model (POM) framework, the OOPs concept is applicable by treating each page of the application as an object, with its own set of properties and methods. Each page object is designed to represent a specific page or a section of the application. The page objects are designed to encapsulate the details of the page, such as the page structure and the web elements within the page, which allows for a separation of concerns between the test logic and the implementation details. This helps to create more maintainable and scalable automation tests. For example, let's say we have a LoginPage class that represents the login page of our application. This class can have methods to perform actions on the login page such as entering the username and password, and clicking on the login button. The LoginPage class can also have properties to represent the elements on the page, such as the username input field, password input field, and login button. Regarding the use of private locators in JavaScript, while JavaScript doesn't have a reserved keyword for private access, it is still recommended to use encapsulation and make the locators private by convention. In JavaScript, you can use naming conventions such as using a prefix underscore '_' to denote private properties and methods. By doing so, you can control access to the locators and prevent direct modification of the page object's internal state from outside the class, ensuring the integrity of your test suite
@mouthecutest
@mouthecutest Жыл бұрын
@@RaghavPal Thanks a lot Raghav for such a detailed explanation. I am an ardent follower of your content..We cannot be more thankful for everything you do for the testing community. Much appreciated.
@InTheMirrorr
@InTheMirrorr 11 ай бұрын
I came to your channel when I was searching for some issue. But thanks to youtube I found your amazing channel .. I spent some hours watching and exploring it; really amazing content!!! I would like to take your advice on a situation I'm facing .. we have some vendor apps that does not allow Silent installation and we need to automate that process, apps allow only GUI interaction and applying onscreen parameters :( I saw your tutorial about Autoit, but it generates EXE that will be probably rejected by Security team specially in PRD environment. Is there other recommended tools? Many thanks in advance bro!
@RaghavPal
@RaghavPal 11 ай бұрын
Hasan There are a few other tools that you can use to automate the installation of applications that do not allow silent installation. One option is to use a tool like **UiPath**. UiPath is a powerful automation tool that can be used to automate a wide variety of tasks, including the installation of applications. UiPath is a commercial tool, but it offers a free community edition that you can use for personal and non-commercial use. Another option is to use a tool like **Selenium**. Selenium is an open-source tool that can be used to automate the interaction with web applications. You can use Selenium to automate the installation of an application by interacting with the application's installer GUI. Finally, you can also use a tool like **AutoHotkey**. AutoHotkey is a scripting language that can be used to automate a wide variety of tasks. You can use AutoHotkey to automate the installation of an application by creating a script that simulates the user clicking on the installer's GUI elements. Which tool you use will depend on your specific needs and preferences. If you need a powerful automation tool that can be used to automate a wide variety of tasks, then UiPath is a good option. If you are looking for a free tool, then the UiPath community edition is a good option. If you only need to automate the installation of applications, then Selenium or AutoHotkey are good options. Here are some additional things to keep in mind: * When automating the installation of applications, it is important to make sure that the applications are installed correctly. You should test the automation script thoroughly to make sure that it does not cause any problems. * You should also make sure that the automation script is secure. You should avoid using any tools that generate EXE files that are not approved by your security team. I hope this helps!
@InTheMirrorr
@InTheMirrorr 11 ай бұрын
@@RaghavPal Thanks alot for your reply; actually they are desktop apps so I excluded Selenium .. I will check UiPath. Thanks Pal :)
@salim3600
@salim3600 Ай бұрын
Dear Sir, This is excellent, and your way of explaining is awesome. Do you have a playlist for 'Playwright with C#'? I look forward to your reply!
@RaghavPal
@RaghavPal Ай бұрын
Thanks Salim, not as of now, I will plan on it, can check all playlists here - automationstepbystep.com/
@marilagc
@marilagc Жыл бұрын
Hi. Thank you for this video. I would like to ask if you have any idea if I can integrate playwright with apache jmeter? My aim is to test the client side performance of the app by executing a playwright script via jmeter. Is it possible? Thank you so much.
@RaghavPal
@RaghavPal Жыл бұрын
Hi Erika, Yes, it is possible to integrate Playwright with Apache JMeter to test the client-side performance of an application. Here's one way to achieve this integration: Create a Playwright script to perform the desired actions on your application. Use a tool like Playwright Test Runner to run your script and generate a HAR file that captures network traffic data. Convert the HAR file to a JMeter JMX file using a tool like HAR to JMeter Converter. In JMeter, create a new test plan and add an HTTP(S) Test Script Recorder to capture HTTP requests. Start the HTTP(S) Test Script Recorder and configure it to record requests on the desired port. Run your Playwright script while the HTTP(S) Test Script Recorder is running to capture the network traffic. Stop the HTTP(S) Test Script Recorder and the Playwright script. Import the JMX file generated by the HAR to JMeter Converter into JMeter. Run your JMeter test plan to perform load testing and analyze the client-side performance of your application. I hope this helps you integrate Playwright with Apache JMeter for client-side performance testing
@abhisingh6016
@abhisingh6016 Жыл бұрын
Hi Sir. Please do a comparison between Selenium and Playwright so that a fresher like me can get overall idea.
@RaghavPal
@RaghavPal Жыл бұрын
Noted Abhi
@CH-jz2xz
@CH-jz2xz Жыл бұрын
I have test cases stored in AzureDevOps. Can I associate that test cases to the Playwright automated test case. Example: Testcase1 associate it to TestCase1(Playwright)?
@RaghavPal
@RaghavPal Жыл бұрын
Hi C H, Yes, it is possible to associate test cases stored in Azure DevOps with Playwright automated test cases Here are a few ways you can do this: You can use the Azure DevOps REST API to retrieve the test cases and then use the test case IDs or titles to map them to the corresponding Playwright test cases You can use Azure DevOps Test Plans and Test Suites to group and organize your test cases, and then use the Test Suite and Test Plan IDs to map them to the corresponding Playwright test cases You can also use Azure DevOps Test Case Work Items to link the test cases with Playwright automated test cases, by adding a link from Azure DevOps Test Case to the Playwright test case It is important to note that the exact method for associating test cases will depend on how you have structured your test cases in Azure DevOps and how you have implemented your Playwright tests. You may need to customize the integration to fit your specific needs
@RahulSharma-ke7wg
@RahulSharma-ke7wg 2 ай бұрын
thanks for this video series, i want to use playwrite add on in my storybook ,can you make a video of any by making a component and use stories to test ,i would be helpfull 🙂
@RaghavPal
@RaghavPal 2 ай бұрын
I will check and plan Rahul
@AD-mn4wy
@AD-mn4wy 8 ай бұрын
Thank you for this, is there any video of playwright with JAVA? Can we use this for rendering pdf headless using html?
@RaghavPal
@RaghavPal 8 ай бұрын
Not yet created Playwright with Java
@manikantan2457
@manikantan2457 Жыл бұрын
Which one to use cypress or playwright ? As per the blogs playwright might take over cypress or how much support is provided for playwright? Just wanted to know Sir
@RaghavPal
@RaghavPal Жыл бұрын
Hi Mani, with the current state, Playwright has an edge over Cypress, Some of the major points are - Browser support - Language support - Fast - Multi-window, multi-tab execution Here Playwright scores over Cypress
@manikantan2457
@manikantan2457 Жыл бұрын
@@RaghavPal thanks sir let me check and think. About it because we have started with cypress implementation for our project .
@RaghavPal
@RaghavPal Жыл бұрын
If its working fine and solving your needs, you should continue with it
@srividya76
@srividya76 Ай бұрын
Hi raghav, is this playwright automation supports to react application ? I want to use playwright automation
@RaghavPal
@RaghavPal Ай бұрын
Playwright is good choice for automating React applications. Here's why: 1. Targeting React Components: - With Playwright, you can easily target React components to test modular UIs - It ensures test reliability and speed, allowing developers to focus on building rather than debugging. 2. Features of Playwright: - Cross-Browser Compatibility: Playwright works with modern rendering engines (Firefox, WebKit, Chromium). - Headless and GUI Modes: Launch browsers in GUI mode for development/debugging or headless mode for faster testing. - Cross-Language Support: Access the Playwright API from JavaScript, TypeScript, Python, .NET, and Java. - Mobile Web Evaluation: Supports Chrome for Android and Mobile Safari native emulation. - CI Integration: Easily integrate with CI environments for continuous testing. - Playback and Codegen Recording: Create test scripts by recording interactions with the browser 3. Unified Testing Strategy: - Playwright helps create a unified testing strategy across different levels, including end-to-end testing for React applications Feel free to explore Playwright for your React projects-it's a powerful tool for automating web interactions Do a POC before finalising the tool -
@adityamishal7085
@adityamishal7085 10 күн бұрын
@Raghav Playwrite can be used to automate Mobile apps ? Android and iOS ?
@RaghavPal
@RaghavPal 10 күн бұрын
Aditya Playwright is primarily designed for automating web browsers, not mobile apps. However, it does provide some mobile-related features through its browser emulation capabilities. Playwright allows you to emulate mobile devices using its `browserType.launch` method with the `--mobile` flag. This enables you to simulate mobile devices, such as iPhones or Android phones, within a desktop browser. While this is useful for testing mobile-responsive web applications, it's not the same as automating native mobile apps. To automate native mobile apps, you need a framework that can interact with the mobile operating system and the app itself. Some popular alternatives for mobile app automation are: * Appium: An open-source test automation framework that supports both Android and iOS. * Robot Framework: A generic test automation framework that can be used with various libraries, including those for mobile app automation. * Espresso (Android) and XCTest (iOS): Native testing frameworks provided by the respective mobile operating systems. -
@nomandladube5087
@nomandladube5087 Жыл бұрын
Hi i got 8/10 yeeeeeeh im so happy thank you so much for this videos
@RaghavPal
@RaghavPal Жыл бұрын
Great score
@meghana1229
@meghana1229 Жыл бұрын
Hi Raghav Can you explain me what is this limitation of Playwright ? Limitations: Java language bindings: The Playwright API cannot be used in Java or Ruby today. This is a temporary limitation as Playwright is built to support bindings for any language.
@RaghavPal
@RaghavPal Жыл бұрын
I will do a session
@kidvikvlogs
@kidvikvlogs Жыл бұрын
Hi ragav,which combination is suggested? Playwright with javascript or Playwright with Java Kindly choose anyone and why
@RaghavPal
@RaghavPal Жыл бұрын
Hi Karthic Both combinations are possible and can be used depending on the project requirements and the developer's expertise Using Playwright with JavaScript is suitable for developers and testers who have experience with JavaScript and prefer to work with Node.js. JavaScript is a popular programming language with a large community, so it is easy to find solutions to any issues or problems that may arise during development. On the other hand, using Playwright with Java is suitable for developers and testers who prefer to work with Java, which is also a popular programming language. Java has been in use for a long time and has a vast community, so there are numerous libraries and tools available to help developers in their development work. Ultimately, the choice between using Playwright with JavaScript or Java depends on the specific needs and skills of the dev and testing team
@petergerendeli2891
@petergerendeli2891 7 күн бұрын
Hi' I already writing automaticn tests using IDE = VSCode and robot framework. my question is, can I use the same vscode for trying out playwright opening a new folder or a new workspace in vscode? thanks
@RaghavPal
@RaghavPal 5 күн бұрын
Péter Let's break down the problem step by step: Step 1: Understand the current setup You are currently using VSCode (Visual Studio Code) as your Integrated Development Environment (IDE) to write automatic tests using the Robot Framework. Step 2: Identify the new requirement You want to try out Playwright, a browser automation framework, and you're wondering if you can use the same VSCode instance to do so. Step 3: Consider the options To use Playwright, you have two options: a. Create a new folder within the existing workspace: You can create a new folder within your existing VSCode workspace and start writing Playwright tests there. This approach allows you to keep your Robot Framework tests and Playwright tests separate, but still within the same workspace. b. Create a new workspace in VSCode: You can create a brand new workspace in VSCode, specifically for your Playwright tests. This approach allows you to keep your Robot Framework tests and Playwright tests completely separate, with their own distinct workspaces. Step 4: Evaluate the feasibility Both options are feasible, and VSCode supports multiple folders and workspaces. You can easily create a new folder or workspace in VSCode and start writing Playwright tests. Step 5: Choose the approach The choice between options a and b depends on your personal preference and how you want to organize your projects. If you want to keep your Robot Framework and Playwright tests separate but still accessible from the same VSCode instance, option a might be suitable. If you prefer to keep them completely separate, option b might be a better fit. Conclusion Yes, you can use the same VSCode instance to try out Playwright by creating a new folder or workspace. You can choose the approach that best suits your needs and start writing Playwright tests alongside your Robot Framework tests -
@petergerendeli2891
@petergerendeli2891 5 күн бұрын
@@RaghavPal thanks, figured it out on my own, already put playwright on my Mac and also run my 1st test in playwright in vscode.
@pagidivamsikrishna3809
@pagidivamsikrishna3809 5 ай бұрын
#AskRaghav Can we use Playwright to test the Analytics Dashboard? Or any other tools to test Dashboards. Pleas suggest.
@RaghavPal
@RaghavPal 5 ай бұрын
Absolutely! Testing dashboards is crucial for ensuring data accuracy and functionality, and several tools, including Playwright, can be effectively used for this purpose. Here's a breakdown of various options: Playwright: - While Playwright excels at testing web applications, it can also handle dashboard testing with some considerations: - Limited visual comparison: Playwright primarily asserts on text content and element interactions, not complex visualizations. - Need for scripting: You might need to write custom logic to analyze charts and graphs effectively. Advantages: - Familiar language (TypeScript, JavaScript, Python, .NET) - Cross-browser testing - Fast and reliable Alternatives: - Cypress: Similar to Playwright, good for basic dashboard testing but limited in visual verification. - Selenium: Widely used, supports advanced visual comparisons but can be more complex to set up. - Specialized tools: - Applitools: Focuses on visual regression testing, ideal for verifying chart layouts and colors. - TestCraft: Designed specifically for BI and data visualization testing, offers pre-built assertions for charts and graphs. Choosing the right tool: - Complexity of dashboard: For simple dashboards, Playwright or Cypress might suffice. For complex visualizations, consider Applitools or TestCraft. - Development team familiarity: Select a tool with languages your team is comfortable with for easier adoption. - Specific needs: Assess your testing requirements (visual verification, performance, data accuracy) and choose a tool that addresses them effectively. Additional tips: - Combine tools for comprehensive testing: Use Playwright for basic functionality and Applitools for visual regression. - Start with manual testing to identify key areas for automation. - Pay attention to performance and usability aspects during testing. I hope this helps
@meenalkuber2247
@meenalkuber2247 4 ай бұрын
Hello , your videos are always useful. I would like to know if you have series of Playwright with .Net please similar to Node project series with Playwright? Thanks
@RaghavPal
@RaghavPal 4 ай бұрын
Not yet Meenal.. will plan
@UsmanMusharafSays
@UsmanMusharafSays 11 ай бұрын
Hi Sir, this is amazing - one request, when you say you can take screenshot to remember the stuff, can you please hide yourself from the screen for a sec so we can take the screenshot with ease😅and you are awesome tutor, thank you!
@RaghavPal
@RaghavPal 11 ай бұрын
Noted Usman, I will take care in future videos
@paveldesort5657
@paveldesort5657 7 ай бұрын
just a notice for taking screenshots to keep for later. It would be great if your video recording window would disappear for a second to be able to make a clean screenshot (putting your watermark somewhere instead perhaps) because your video recording screen covers partly the bullet points you are describing. Otherwise excellent tutorial, thanks a lot
@RaghavPal
@RaghavPal 7 ай бұрын
Thanks for the feedback. I will take care in future
@ashishnaidu2487
@ashishnaidu2487 6 күн бұрын
Hi Raghav sir, can you please let me know what are the pre-requisites that I need to learn before starting learning Playwright? I'm preferred to choose C# programming language but want to know what more I need to learn please in order to perform a smooth E2E testing.
@RaghavPal
@RaghavPal 5 күн бұрын
Ashish To get started with Playwright and perform smooth End-to-End (E2E) testing using C#, here are the pre-requisites you should consider: 1. Programming fundamentals: * You should have a good grasp of programming concepts, such as variables, data types, control structures, functions, and object-oriented programming (OOP) principles. 2. C# programming language: * You've mentioned you prefer C#, so you should have a solid understanding of C# syntax, features, and best practices. * Familiarize yourself with C# versions 8.0 or higher, as Playwright supports these versions. 3..NET Core: * Playwright is built on top of.NET Core, so it's essential to understand the basics of.NET Core, including: +.NET Core framework + NuGet packages + Dependency injection + Configuration and settings 4. Web development basics: * Understand how web applications work, including: + HTML (structure and syntax) + CSS (styling and layout) + JavaScript (client-side scripting) + HTTP requests and responses + Web browsers and their rendering engines 5. Selenium WebDriver: * Although Playwright is an alternative to Selenium, understanding Selenium's concepts and architecture will help you appreciate Playwright's design and features. * Familiarize yourself with Selenium's WebDriver API and how it interacts with browsers. 6. Browser automation: * Learn about browser automation concepts, such as: + Browser instances and sessions + Element interaction (e.g., clicking, filling forms) + Waits and timeouts + Handling alerts and pop-ups 7. Testing frameworks and principles: * Understand testing concepts, such as: + Test-driven development (TDD) + Behavior-driven development (BDD) + Unit testing, integration testing, and E2E testing * Familiarize yourself with popular testing frameworks, such as NUnit, xUnit, or MSTest. 8. Playwright-specific knowledge: * Once you have a solid foundation in the above areas, dive into Playwright's documentation and learn about: + Playwright's architecture and design principles + Browser types and launch modes + Frames, contexts, and pages + Element handling and interaction + Waits, timeouts, and retries + Error handling and debugging -
@ashishnaidu2487
@ashishnaidu2487 4 күн бұрын
@@RaghavPal Thank you so much for explaining me in such a detailed manner, now I can confidently start my Playwright journey with C# programming language. Thanks a ton once again for sharing this information with me sir. I'm really sorry to trouble you again with my one more query please, is this the same with the "Python" programming language too or is there is any difference when using Python with Playwright please?
@RaghavPal
@RaghavPal 3 күн бұрын
Ashish Playwright provides a unified API across multiple programming languages, including C#, Python, Java, and Node.js. This means that the core concepts, such as: * Launching browsers * Creating browser contexts * Navigating pages * Interacting with elements * Handling events are similar across all supported languages. Identify the differences While the core concepts are similar, there are some differences in using Playwright with Python compared to C#: * Syntax: The most obvious difference is the syntax of the programming languages themselves. Python's syntax is more concise and flexible, while C#'s syntax is more verbose and strict. * Library usage: In C#, you would use the `Microsoft.Playwright` NuGet package, whereas in Python, you would use the `playwright` library installed via pip. * Async/await: Python's async/await syntax is more concise and expressive than C#'s, which can make the code look slightly different. * Error handling: Python's error handling mechanisms, such as try-except blocks, differ from C#'s try-catch blocks. In summary, while there are some differences in using Playwright with Python compared to C#, the core concepts and API remain the same. If you learn Playwright with C#, you can easily adapt to using it with Python, and vice versa. The main differences lie in the syntax, library usage, async/await, and error handling mechanisms of the respective programming languages. I hope this step-by-step breakdown helps clarify the differences and similarities between using Playwright with C# and Python -
@takandalotakaanesh65
@takandalotakaanesh65 Жыл бұрын
@AskRaghav i have a question it is possible to add cucumber(feature file) on playwright
@RaghavPal
@RaghavPal Жыл бұрын
Hi Yes, it is possible to add Cucumber (feature file) on Playwright. Cucumber is a behavior-driven development (BDD) framework that allows you to write tests in a natural language format. Playwright is a web automation framework that allows you to automate web applications. To add Cucumber (feature file) on Playwright, you can follow these steps: 1. Create a new feature file. 2. In the feature file, write the tests in a natural language format. 3. Use the Playwright API to interact with the web application. 4. Run the feature file. Here is an example of a Cucumber (feature file) that uses Playwright: ``` Feature: Login to Facebook Scenario: Login with valid credentials Given I am on the Facebook login page When I enter my email address And I enter my password And I click on the login button Then I should be logged in to Facebook ``` To run the feature file, you can use the following command: ``` npx playwright test my-feature-file.feature ``` This will run the feature file and generate a report. I hope this helps
@sreelaxmim8971
@sreelaxmim8971 Жыл бұрын
For learning automation testing , selenium or playwright which is a better option? please advise.
@RaghavPal
@RaghavPal Жыл бұрын
Hi Sreelaxmi Both Selenium and Playwright are popular and powerful automation testing frameworks, and the choice between them depends on your specific requirements and preferences. Here are some factors to consider: 1. *Browser Support:* Selenium has been around for a longer time and offers support for a wide range of browsers, including Chrome, Firefox, Safari, and Internet Explorer. Playwright, on the other hand, provides cross-browser support for Chrome, Firefox, and WebKit (including Safari). If you need to test on multiple browsers, Selenium might be a better choice. 2. *Programming Language:* Selenium supports multiple programming languages, including Java, C#, Python, Ruby, and more. Playwright, on the other hand, supports JavaScript/TypeScript, Python, and .NET. If you have a preference for a particular programming language, choose the framework that aligns with your expertise. 3. *Ease of Use:* Playwright is known for its simplicity and developer-friendly APIs, making it relatively easier to learn and use. It provides a high-level API that abstracts away many complexities of browser automation. Selenium, while powerful, can have a steeper learning curve due to its more comprehensive feature set and mature ecosystem. 4. *Browser Automation Capabilities:* Both Selenium and Playwright offer robust browser automation capabilities, including page navigation, form filling, element interaction, and more. However, Playwright provides some additional features like native mobile automation (for Android and iOS), file uploads, and better support for modern web technologies. 5. *Community and Support:* Selenium has a larger and more established community, with extensive documentation, tutorials, and online resources. It also has a wide range of integrations and third-party libraries available. Playwright, although relatively newer, has been gaining popularity and has an active community and growing support. Consider your specific needs, the programming language you are comfortable with, and the level of browser support required for your project. Both Selenium and Playwright are excellent choices, and you can't go wrong with either of them. It may be beneficial to try out both frameworks on smaller projects or sample applications to get a better sense of their features, ease of use, and suitability for your testing requirements
@sreelaxmim8971
@sreelaxmim8971 Жыл бұрын
@@RaghavPal thanks Raghav for detailed explanation..
@zaiterzaiter2034
@zaiterzaiter2034 Жыл бұрын
Does it support partial Dom (can I get the loaded html and css code even if the page has not fully loaded, because in selinium it is not supported)
@RaghavPal
@RaghavPal Жыл бұрын
Playwright has auto-wait and in-built timeout assertions, so this is taken care
@zaiterzaiter2034
@zaiterzaiter2034 Жыл бұрын
@@RaghavPalThank you sir for the info
@sandeshnaik9918
@sandeshnaik9918 Жыл бұрын
Hello Raghav can you please do video on strorage state and use that state globally
@RaghavPal
@RaghavPal Жыл бұрын
I will check on that Sandesh
@attitudeneverwronga8139
@attitudeneverwronga8139 6 ай бұрын
Hi Raghav I was a manual functional tester with 7 years experience and 6 years of career break. Now i have got an opportunity to work on a project as a part of recruitment process. It includes automation testing in playwright. I am just starting to learn automation and hoping to complete the project. If you can provide any one-to-one guidance as i learn that will help me a lot. Please respond. This job will be a great leap in restarting my career.
@RaghavPal
@RaghavPal 6 ай бұрын
Hi You can check all sessions here automationstepbystep.com/ Apart from this there is no live or 1-to-1 sessions. You can always ask your ques in comments All the best
@attitudeneverwronga8139
@attitudeneverwronga8139 6 ай бұрын
Sure. Thank you.
@enoaarthur790
@enoaarthur790 3 ай бұрын
Got 9/10 for the quizz
@RaghavPal
@RaghavPal 3 ай бұрын
Great score Enoa.. keep learning
@DK-ik3bf
@DK-ik3bf 5 ай бұрын
Hi Raghav, I tried to specified the browser by adding "--project=chromium" when running my test. However in my terminal it keeps showing that it runs x amoun of test using 3 workers. Why is that? It is only running in Chrome as I specified. But why does it says that it is using 3 workers instead of 1 worker? Do you know? Thank you
@RaghavPal
@RaghavPal 5 ай бұрын
Let's dive into the details of Playwright and address your query. 1. Workers in Playwright: - When you run tests using Playwright, it creates worker processes to execute those tests. Each worker process operates independently and has its own environment. These workers allow parallel execution of tests, which can significantly reduce the overall test execution time. - By default, Playwright uses multiple workers to run tests concurrently. However, you can control the number of workers based on your requirements. 2. Specifying Workers in CI Environments: - In Continuous Integration (CI) environments, it's essential to prioritize stability and reproducibility. Running tests sequentially ensures that each test gets the full system resources, avoiding potential conflicts. - Therefore, we recommend setting the number of workers to "1" in CI environments. This ensures that tests run one after the other, maintaining stability. - If you have a powerful self-hosted CI system, you may consider enabling parallel tests. For wider parallelization, you can distribute tests across multiple CI jobs (sharding). 3. How to Set the Number of Workers: - To configure the number of workers, create or update your `playwright.config.ts` file with the following snippet: ```typescript import { defineConfig } from '@playwright/test'; export default defineConfig({ // Opt out of parallel tests on CI. workers: process.env.CI ? 1 : undefined, }); ``` - In this configuration, we set the number of workers to 1 when running in a CI environment (detected by the `process.env.CI` flag). 4. Browser Selection: - You mentioned that you're running tests using the Chromium browser specified by `--project=chromium`. Playwright uses open-source Chromium builds by default. - Since Playwright supports Chromium versions ahead of branded browsers (like Google Chrome and Microsoft Edge), it's possible that the Chromium version used by Playwright is different from the one you have installed locally. 5. Additional Tips: - When using Docker containers, consider adding `--ipc=host` to avoid memory issues with Chromium. - If you encounter other unexpected errors when launching Chromium, try running your container with `docker run --cap-add=SYS_ADMIN`. - Using `--init` or `dumb-init` in Docker is recommended to prevent special treatment for processes with PID=1 (which can cause zombie processes). Remember, the number of workers impacts test execution speed, but stability and reproducibility should be your priority, especially in CI environments. ..
@mittalri
@mittalri Жыл бұрын
good! does it support Native app?
@RaghavPal
@RaghavPal Жыл бұрын
Hi Ritesh, Yes, Playwright supports testing of native mobile apps on both Android and iOS devices. Playwright has a separate library called playwright-mobile that provides a set of APIs for automating native mobile apps To get started with mobile testing using Playwright, you will need to install the playwright-mobile package, which can be installed via npm. You will also need to have the Android SDK or Xcode installed, depending on which platform you want to test.
@nishanthN4B2
@nishanthN4B2 9 ай бұрын
Hi Raghav, what if I have like 2-4 day process as a test scenario. For example, we load orders, and wait until the next day for the status to change, and then third day it finally settles. Would I be able to automate them and can I please know how ?
@RaghavPal
@RaghavPal 9 ай бұрын
Nishanth Yes, you can automate a 2-4 day process as a test scenario using Playwright. Here are some steps you can follow: 1. *Divide the process into smaller steps.* This will make it easier to automate each step and troubleshoot any problems. 2. *Write a test case for each step.* Use Playwright's API to automate the steps in your test case. 3. *Use Playwright's `wait()` function to wait for the desired status change.* For example, you can wait for the order status to change to `shipped` before proceeding to the next step in your test case. 4. *Save your test cases and run them using Playwright.* Here is an example of a Playwright test case for a 2-4 day process: ```python async def test_order_process(): # Load the order. await page.goto("example.com/order/1234567890") # Wait for the order status to change to `shipped`. await page.wait_for_selector(".order-status", state="visible", text="Shipped") # Verify that the order has been shipped. assert page.locator(".order-status").text == "Shipped" # Wait for the order status to change to `settled`. await page.wait_for_selector(".order-status", state="visible", text="Settled") # Verify that the order has been settled. assert page.locator(".order-status").text == "Settled" ``` You can use this test case as a starting point to automate your 2-4 day process. You will need to modify the test case to match the specific steps in your process and to wait for the correct status changes. You can also use Playwright's `record()` function to record a video of your test case as it is running. This can be helpful for troubleshooting problems and for documenting your tests. I hope this helps
@nishanthN4B2
@nishanthN4B2 9 ай бұрын
@@RaghavPal Thank you, much appreciated, I'll have a try. And you're videos are really helpful for us, Thanks for that 🙂
@hansamadhuranga344
@hansamadhuranga344 Жыл бұрын
hi Can you do SAP S4 HANA Fiori application automation session?
@RaghavPal
@RaghavPal Жыл бұрын
Hi Hansa, I will check on this
@amarkadam9831
@amarkadam9831 8 ай бұрын
Hello Raghav sir, Could you please help me in below question, I want to send Playwright test reports to slack channel using typescript?
@RaghavPal
@RaghavPal 8 ай бұрын
Amar Certainly, I can assist you in sending Playwright test reports to a Slack channel using TypeScript. Here's a step-by-step guide to achieve this: 1. **Install Required Packages:** Install the necessary packages for Playwright and Slack interactions using npm: ```bash npm install playwright @slack/web-api ``` 2. **Configure Slack Web API:** Create a Slack app and obtain the OAuth token for your Slack bot. Store this token securely as an environment variable named `SLACK_BOT_USER_OAUTH_TOKEN`. 3. **Create the Playwright Report Sender:** Create a TypeScript file (e.g., `playwrightSlackReporter.ts`) to handle the report generation and sending process: ```typescript import { defineConfig } from '@playwright/test'; import { SlackClient } from '@slack/web-api'; export async function sendPlaywrightReportToSlack(report: string, channels: string[]) { const slackClient = new SlackClient({ token: process.env.SLACK_BOT_USER_OAUTH_TOKEN }); for (const channel of channels) { const message = { channel: channel, text: `Playwright Test Report: ${report}`, }; await slackClient.chat.postMessage(message); } } ``` 4. **Integrate with Playwright Configuration:** In your Playwright test configuration file (e.g., `playwright.config.ts`), import the report sender function and use it to send the report after test execution: ```typescript import { defineConfig } from '@playwright/test'; import { sendPlaywrightReportToSlack } from './playwrightSlackReporter'; export default defineConfig({ reporter: [ ['html', { outputFile: 'test-results.html' }], async ({ config, report }) => { const channels = ['#playwright-tests', '#dev-reports']; await sendPlaywrightReportToSlack(report.toString(), channels); }, ], }); ``` 5. **Run Playwright Tests:** Execute your Playwright tests using the `npx playwright test` command. The generated test reports will be sent to the specified Slack channels upon test completion.
@basurajs
@basurajs 4 ай бұрын
@raghav, Thanks for your guidance on new automation tools. Could you please make a video on AI Powered Test Automation Tools and how it is different from playwright. Thanks
@RaghavPal
@RaghavPal 4 ай бұрын
Sure
@basurajs
@basurajs 4 ай бұрын
@@RaghavPal thank you
@garimagupta1840
@garimagupta1840 Жыл бұрын
@Raghav Is playwright supports servicenow tool ??
@RaghavPal
@RaghavPal Жыл бұрын
Hi Garima Yes, Playwright supports automating web applications built with ServiceNow. ServiceNow is a widely used IT service management platform, and Playwright can be used to automate interactions with ServiceNow's web interface. To automate ServiceNow using Playwright, you would typically follow these steps: 1. Install Playwright: Set up Playwright in your development environment by installing the necessary dependencies and configuring the desired browser. 2. Create Playwright Scripts: Write scripts using Playwright's APIs to interact with ServiceNow. You can use functions like `page.goto()` to navigate to specific pages, `page.fill()` to populate form fields, and `page.click()` to interact with buttons or links. 3. Use ServiceNow's Object Locators: Identify the appropriate object locators (e.g., CSS selectors, XPath) to target the specific elements within the ServiceNow application that you want to interact with. You can use browser development tools or inspection tools to find these locators. 4. Implement Test Scenarios: Write test scenarios that cover the desired functionality of the ServiceNow application. This may involve logging in, performing actions within the application, validating results, and logging out. 5. Execute Playwright Scripts: Run your Playwright scripts to automate the interactions with ServiceNow. You can execute the scripts locally or integrate them into your testing pipeline. It's worth noting that since ServiceNow is a complex application, you may need to handle various scenarios like authentication, dynamic page elements, and asynchronous behavior. Playwright provides features to handle these situations, such as waiting for elements to be visible or waiting for network requests to complete By leveraging Playwright's capabilities, you can automate the testing and validation of ServiceNow workflows, forms, and other functionalities, making your testing process more efficient and reliable
@sourabhkaujalgi8456
@sourabhkaujalgi8456 6 ай бұрын
Hi Raghav , Should i choose javascript or python to learn playwright?.which will have better opportunities in the market? I have experience in selenium java. Please give your opinion.
@RaghavPal
@RaghavPal 6 ай бұрын
Sourabh Here's my opinion on choosing JavaScript or Python for Playwright, considering market opportunities and your Selenium Java experience: Overall, both JavaScript and Python offer excellent support for Playwright and have strong job market prospects. The best choice depends on your preferences, experience, and career goals: Factors to Consider: - JavaScript: - Pros: - Native language of Playwright, providing seamless integration and potential performance benefits. - Extensive ecosystem of libraries, tools, and resources for web development. - Strong demand in both web development and automation testing. - Cons: - Less familiar to you based on your Java background. - Dynamic typing might require more testing discipline. - Python: - Pros: - Widely used for automation testing, with a large community and support. - Known for readability and ease of learning. - Extensive libraries for data manipulation and analysis. - Cons: - Not the native language of Playwright, potentially introducing some overhead. Recommendations: - If you're comfortable with JavaScript or interested in expanding your web development skills, it's an excellent choice for Playwright. - If you prefer a language with clear syntax and extensive libraries for testing and data handling, Python is a strong option. - Your experience with Selenium Java gives you a foundation for understanding testing concepts, making the transition to either language manageable. Market Opportunities: - Both JavaScript and Python have significant demand for automation testing roles. - Consider the specific industries and companies you're interested in to assess their tech stacks and preferred languages. Additional Tips: - Try both languages through tutorials or small projects to get a feel for their syntax and style. - Evaluate your comfort level with dynamic vs. static typing. - Consider your long-term career goals and potential for growth in each language. - Explore the Playwright documentation and community resources in both languages to assess their support and ease of use. Ultimately, the best choice is the one that aligns with your skills, interests, and career aspirations. Both JavaScript and Python are powerful tools for Playwright, and you can achieve great results with either language.
@sourabhkaujalgi8456
@sourabhkaujalgi8456 6 ай бұрын
@@RaghavPal Thank you.I got a clear difference between them.Thanks for explaining all the points.
@nathanstanfordsr
@nathanstanfordsr Жыл бұрын
Is there any way that this could be used for ColdFusion.
@RaghavPal
@RaghavPal Жыл бұрын
Hi Nathan Playwright is a tool that automates browsers, so it can be used for web applications developed with any language as long as it is accessible through a browser. In the case of ColdFusion, if the application can be accessed through a web browser, then Playwright can be used to automate testing or other tasks. Playwright provides support for popular browsers such as Chrome, Firefox, and Safari, and can also be used with headless browsers. However, if you're looking to automate tasks within ColdFusion itself, then Playwright may not be the most suitable tool. In that case, you may want to explore other automation tools that are designed specifically for ColdFusion, such as CFML-based automation frameworks or tools.
@diwanshujangira2854
@diwanshujangira2854 5 ай бұрын
@raghav Hope you are doing good sir Am a manaul tester with 9 years of exp want to switch in automation Which tool should i learn playwright or salnium I have. 0 coding knowledge Hope you reply
@RaghavPal
@RaghavPal 5 ай бұрын
Diwanshu As a manual tester with 9 years of experience looking to transition into automation, choosing the right tool is crucial. Let's compare Playwright and Selenium to help you make an informed decision: 1. Playwright: - What is Playwright? Playwright, developed by Microsoft, is a headless browser testing framework. It provides a high-level API for automating web browsers (Chrome, Firefox, and WebKit) and supports multiple programming languages (JavaScript, Python, Java, and .NET C#). - Strengths: - Modern Features: Playwright is designed for modern web applications and handles features like single-page applications, web components, and shadow DOM efficiently. - Fast Performance: It offers high-speed execution, making it suitable for complex scenarios. - Auto-Wait Strategy: Playwright automatically waits for elements to be actionable, reducing the need for explicit waits. - Cross-Browser Testing: It supports Chrome, Firefox, and WebKit. - Considerations: - Limited Coverage: While Playwright excels in complex web applications, its browser support is narrower compared to Selenium. - Learning Curve: As a beginner, you'll need to learn JavaScript or another supported language. - Smaller Community: The Playwright community is growing but not as extensive as Selenium's. - Recommended for: Testers working on modern web applications who prioritize performance and accuracy. 2. Selenium: - What is Selenium? Selenium is a widely adopted open-source automation framework for web testing. It supports multiple programming languages (Java, Python, C#, etc.) and has a large community. - Strengths: - Comprehensive Coverage: Selenium supports a wide range of browsers (Chrome, Firefox, Edge, Safari, etc.) and platforms. - Versatility: Its language support and community make it versatile and reliable. - Strong Community: Selenium has been around for years, and its community provides extensive resources and support. - Considerations: - Explicit Waits: Selenium requires explicit waits (implicit, explicit) to handle dynamic elements, which can lead to flaky tests. - Handling Modern Features: While Selenium can handle modern web features, it may not be as efficient as Playwright. - Learning Curve: Learning Java or another language might be necessary. - Recommended for: Testers who need comprehensive browser coverage, scalability, and flexibility. 3. Decision Factors: - Prioritize Coverage: If broad browser support is critical, consider Selenium. - Modern Applications: For modern web apps, Playwright's features shine. - Coding Knowledge: Since you're starting from scratch, both tools require learning, but Selenium might be more familiar due to its longevity.
@nagendranfriends3153
@nagendranfriends3153 Жыл бұрын
Requesting you to give video on how to connect gmail with imap lib in js for reading mail otp . Please
@RaghavPal
@RaghavPal Жыл бұрын
I will check and plan Nagendran
Playwright Beginner Tutorial 2 | How to install
25:46
Automation Step by Step
Рет қаралды 141 М.
PURE CAFE BACK OFFICE AND HOW TO ENROLL TRAINING 12924
9:24
39kgのガリガリが踊る絵文字ダンス/39kg boney emoji dance#dance #ダンス #にんげんっていいな
00:16
💀Skeleton Ninja🥷【にんげんっていいなチャンネル】
Рет қаралды 8 МЛН
Now THIS is entertainment! 🤣
00:59
America's Got Talent
Рет қаралды 39 МЛН
Session1: Introduction to API Testing
1:28:06
SDET- QA
Рет қаралды 958 М.
Playwright Beginner Tutorial 5 | How To Record Tests
27:59
Automation Step by Step
Рет қаралды 59 М.
Playwright Beginner Tutorial 3 | How to run tests
14:46
Automation Step by Step
Рет қаралды 100 М.
Playwright Interview Questions and Answers
16:36
LetCode with Koushik
Рет қаралды 10 М.
Playwright Beginner Tutorial 4 | How to write 1st Test
24:54
Automation Step by Step
Рет қаралды 87 М.
39kgのガリガリが踊る絵文字ダンス/39kg boney emoji dance#dance #ダンス #にんげんっていいな
00:16
💀Skeleton Ninja🥷【にんげんっていいなチャンネル】
Рет қаралды 8 МЛН