Introduction to web Automation testing with Playwright
Vložit
- čas přidán 25. 08. 2024
- In this first-ever video on the internet, we are going to introduce, work and understand about Playwright tool from the Microsoft team. The first-ever tool which is pretty much cloned from its own incarnation and going to swing the market of UI automation which is so much flaky these days!
Playwright
***********
Playwright is built by the same team that originally built Puppeteer at Google, but has since then moved on to Microsoft. Puppeteer proved that there is a lot of interest in the new generation of ever-green, capable and reliable automation drivers. Puppeteer is a Node library that provides a high-level API to control Chrome or Chromium over the DevTools Protocol.
This video is going to part of course www.udemy.com/...
Source code in GitHub repo: github.com/exe...
Module loader : • Part 12 - Understandin...
#executeautomation #playwright #udemy #puppeteer #selenium #chrome #edgechrome #webkit #automationtesting #google #microsoft
To learn more from ExecuteAutomation, please subscribe and check out below playlists of FREE courses
Selenium and C#
******************
C# for automation testing - • C# for Automation Testing
Selenium with C# - • Introduction to Seleni...
BDD with Specflow - • BDD and Specflow
BDD with Selenium - • BDD with Selenium and ...
Selenium .NET Core - • Playlist
Selenium &Java
******************
Cucumber with Selenium (cucumber focused) - • Section 1 - Cucumber w...
Cucumber with Selenium • Section 2 - Cucumber W...
Cucumber 4 Upgrade - • Section 3 - Upgrade to...
Selenium Grid - • Selenium Grid
Selenium framework development - • Selenium Framework Des...
Selenium 4 - • Selenium 4
Selenium Grid with Docker - • Selenium Grid with Docker
Puppeteer - • Puppeteer
E2E with Cypress - • Cypress Tidbits
CI/CD with Microsoft Technologies
****************************
Azure DevOps Service 2019 - • Azure DevOps Service 2019
TFS 2015 - • TFS 2015 (QA & Dev foc...
TFS 2015 Build System - • TFS 2015 Build Systems
Automated Build deployment - • Automated Build+Deploy...
Build + Deploy + Test with Jenkins - • Build+Deploy+Test with...
Docker & Kubernates
************************
Understanding ABC of Docker - • Understanding ABC of D...
Understanding Docker for Windows - • Understanding Docker f...
Selenium Grid with Docker - • Selenium Grid with Docker
Kubernates for Testers - • Kubernetes for Testers
Mobile Testing
****************
Understanding Appium - • Introduction to Appium...
Appium with C# - • Introduction to Appium...
Appium with Java - • Setting stage ready fo...
Appium with C# (Advanced) - • Introduction to Appium...
Appium Framework development - • Introduction to appium...
Mobile Automation testing with Xamarin.UITesting - • Part 1 - Introduction ...
Android automation with Robotium - • Part1 - Introduction t...
Flutter app automation with Flutter Driver - • Part 1 - Introduction,...
TestProject - • TestProject (Basic)
Katalon Studio - • Katalon Studio
WinAppDriver - • Windows Application Dr...
Angular Automation - • Angular automation wit...
EAWeekly - • EA Weekly
Thanks Karthik! Very informative!
You are a god-send for beginners mate!
Thank you mate 🙏
Nice video sir 😊
Well designed tutorial !
Thank you very much for this wonderful video. Can you please give an example to open a new tab (not new window) using Paywright.
U can simply use npm init --yes
Instead of creating a package.json 🙂
Hi it's really great and easy tutorial. Much appreciated. Can we take screenshot of devtool majorly Console tab ?
SO similar with puppeteer!
JH C Yes it is !
Basically a successor
Hi Karthik, it was a nice video. However, Do you have any plan to upload a tutorial on this with an example application along with end to end functionality for the first time users with brief introduction of Java script? If so this is going to be really helpful for going in details and explore.
Really good tutorial; thank you 😊
when using visual studio code as an IDE for playwright script, do we need to install some components or plugins?
What is the benefit over selenium. Only who ever don't know about java and who knows about JavaScript extensively those can use this tool. Apart from any +??
Will it support remote execution?
how to maximize browser window using playwright java? And Cucumber BDD can be integrated with Playwright or not?
Nice video bro. When installing npm playwright browser in vscode, i'm getting failed error which says "failed install chromium v100 and unable to get local issuer certificate" in my company laptop. Do you have any suggestion?
Hi Karthik
Can you please tell me how to work with multiple browser tab in playwright.
I'm getting this error trying to install:
npm ERR! code EJSONPARSE
npm ERR! file C:\Playwright\package.json
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected end of JSON input while parsing near ''
npm ERR! JSON.parse Failed to parse package.json data.
npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.
any clue?
Hello, is it possible to make loadtest/stresstest using playwright? Like make 10/100 login simultaniously to a particular website
At 18 minutes, you put the screenshot of all the browser but I can not see the screenshot file name of safari but you are saying this is the screenshot of safari. You are making viewers confused.
Hello Karthik, Is there assertion mechanism available with playwright?
Yes, since we can use Mocha and Chai for assertion in it
I am confused what is the future of puppeteer?
Iron Fist I guess they both will be developed in parallel, so, I doubt puppeteer will be completely shutdown, may be they will be merged into one in future, not sure !
Hey.. can we connect to db from this?
Does playwright replace puppeteer?
Hi Karthik, I am planning to take udemy Playwright course, do we have any discount coupon please
Hello. Great video, congratulations. I'm learning by watching your classes, and I tried to make an archiv.exe using pkg. But then when I run the exe opens a screen like the cmd. Do you know how to solve this black screen? thank you.
Hi, Could u plz upload video for how to integrate allure report with playwright
Hi Brother,how to bypass captcha? or do you know how to comment on youtube videos?
Is Javascript the future language in automation?
Abhishek Thomas I wouldn’t say, since C# and Java are still the better language to go with, but as these tools are new and prove to use JS as their language for test code development, JS seems to be better, but to your question JS is not the exact future language to come for an conclusion, but learning the language is currently a MUST !
@@ExecuteAutomation I am expecting Java bindings at some point as well. But this project I am ready to start playing with. github.com/kblok/playwright-sharp
Hi Karthik - I am looking for simple piece of code, that will assert\verify the existence &\or loading of commercial Ads in webpage using PlayWright. Can you make that video or refer to one of your existing one? Thanks.
Let me check
Great! Except the problem with all these node-based UI automation tools is the same: they can't talk to existing API code to speed up and simplify the testing process. Got some JAVA code that creates a customer, assigns privileges, and logs them in with a single call? With Cypress, Playwright, Puppeteer, etc -- you can't access that code and have to script that entire process through the UI, or maybe rewrite what that JAVA code was going to accomplish right there in JS code. So, not very good if you need to interface with non-JS code to support what you're doing in the UI.
Follow up 🆙
Can we do mobile apps automation?
Is it possible to manage a browser that wasn't opened by Playwright?
Ofc not. It would contradict the Same-Origin principle. You can only spawn instances using the Playwright library. Attaching to a browser session would be a major security flaw, I think you can agree.
does it supports s ? and hows in comparison with cypress ? any clue plz . thanks
Yes it does !
Here is the full course with all the topics www.udemy.com/course/e2e-playwright/
I have my pre-req done with installing NodeJS and VS IDE but @7.30 sec in video, when i tried to do "npm install", i am getting this error below, any idea what i am missing ? Playwright khobraj$ npm install
npm ERR! code EJSONPARSE
npm ERR! file /Playwright/package.json
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected end of JSON input while parsing near ''
npm ERR! JSON.parse Failed to parse package.json data.
npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.
never mind, i think i fixed somehow...not sure wha exactly but must br removing lock file or fixing extra space somewhere...
Cool
Hello, Im not getting the devtools option in playwright. any other packages need to be imported ?
Muthukumaran Manickam Which version of Playwright are you using ?
@@ExecuteAutomation Its "playwright": "0.10.0"
Muthukumaran Manickam Can you please try 0.11.1 which has the dev tools support
@@ExecuteAutomation I tried but still no luck.
hey thank you very much , can we record the audio of the test please?
Sorry not possible for sure !
@@ExecuteAutomation oki thanks because I saw that on puppeteer, it's possible on stackoverflow
Will it work if i lock the system while code is executing???
Yes for sure it will !
Hey Karthik,
Thanks for this amazing video I really appreciate.
I started the with help of your video and found and that has no name, class or any css. How I can get in Iframe and read text, press button and read and write into textbox or textarea?
Kindly help me out
Hi Aftab,
I guess you can do by iterating through all the frames on the page and get the frame even with its partial link text
for (const frame of page.mainFrame().childFrames())
{
if (frame.url().includes('mypartialframelink'))
{
//operation here
}
}
You can also use name(),title() in the frame.url() if you want to
Thanks,
Karthik KK
@@ExecuteAutomation I took your course puppeteer automation from Udemy. In first lecture you used the spread syntax. Help of that I can proceed.
This concept I am not able to implement, I am a beginner in JavaScript 😊
Could you please create a video how to prase data from using playwright.
Aftab Alam Khan You don't have to use Spread syntax, you can use usual JS syntax to do it as I have did for other lectures
Thanks
Can we have language learning for JS/Type Script for Automation similar to C# for better understanding
For community's sake, dont use javascript. When we have typescript available and even for demo purpose I dont think Javascript shud be the ideal choice. We should encourage use of typescript as much as possible.
Why? TypeScript is niche