Well, before we jump into our next section, I also wanted to take some time to talk about some of
the history of the playwright itself.
Playwright actually started as a tool called Puppeteer and Puppeteer is actually told by the Google
team and playwright is now actually developed and maintained by Microsoft team.
But initially, while the playwright was released, it was actually putting all the code directly from
puppeteer to a new report called US Playwright.
Like in 2020, like an early 2020, all these things happened.
Well, I released a course called Puppeteer Corsages and Playwrite in twenty eighteen.
Well it least the cause it was actually fully focused on puppeteer.
But later, once the playwright was released, I ordered the support for that in the course as well
because both of them were pretty, pretty similar.
So in order to just show you what it is, if you have never heard about Puppeteer, if just go all the
way over here.
So if I just open something called a puppeteer, you can see that there is something called a puppeteer.
They have a site called Peter Deve, which is puppeteer basically.
And this site actually has got all the information on the puppeteer itself.
So you can see that they have the same kind of installation like in I of Puppeteer.
And then they also have something called a puppeteer core, which is going to have only the puppeteer
without the chromium that we just downloaded, if you remember.
And it also has got the same sort of coding logics like how we wrote, because, as you know, puppeteer
is actually the parent of playwrite itself.
So the coding is going to look a bit of more similarity and they are going to look pretty much exactly
the same way how we wrote the code on play.
Right.
So, yes, that's how it's going to be looking like.
In fact, the features that we discussed on the playwright is already there in Puppeteer, and most
of the feature, which is there in Puppeteer, may not be there in playwrite because now they are two
different rapports and they're not going to be maintained like same rapport together.
They're completely different things at the moment.
So what I'm going to do is I'm just going to create a new project within this particular report just
to show you.
And I'm just going to go out and I'm going to call this as M.K. Are you dummy puppeteer Demo and KDDI
Udemy Puppeteer demo.
And I'm just going to put the code expiration date and I'm going to quickly create the same kind of
file like package Dages on and over here.
I'm just going to create the dev dependencies and I'm going to create something called S Puppeteer.
So this is the latest version and I'm just going to open the terminal.
I'm going to do and npm install.
So this is going to install the puppeteer for me.
And you can see that once it installs the puppeteer, it is also going to download the chromium.
But this is going to download the chromium in a different cache, basically.
So earlier it was downloading the chromium Firefox and everything on my cache called as Imust playwrite.
But right now it is downloading in a different cache altogether.
So I'm just going to run or write a simple code over here, like first test dart G.S..
I'm going to go to their website right now, copied a similar code that we just wrote, and I'm going
to pass it over here.
I'm gonna save this.
You can see that the same intelligence works over here as well.
Those are going to remain pretty much exactly the same.
There is no change on that.
And then I'm just going to like Naude our first, just so you can see that the test is actually running
behind the scene and it's going to take a screen shot for us as exampled are being.
And it's going to put that for us on this particular directory probably.
Oops.
It seems like there is something wrong going on while I try to run that.
Let me try changing the headless option to false so that we can see what's really going on.
And if I had to enter.
You can see the browser is actually coming in, but the site can't be reached at the moment.
Maybe it's because of that.
Maybe I'm going to change this to execute automation.
And I'm not close this.
I'm running the test once again.
So you can see that the site is actually being loaded, which is quite good, and it has also taken
the screenshot.
If I'm not wrong, so the example that being is actually our website coming in so you can see that it
is working fine as well.
So this is what is puppeteer and the puppeteer team actually has got what is called as a test runner.
They called us like a just puppeteer, which is going to be like a test runner where you can run your
test pretty much like how you have test runners in Java like Jay, you are testing and in C Sharp you
have something called a must test and in unit unit.
So all those test runners are available for a puppeteer as well.
So this is exactly what is puppeteer tool.
And basically you need to be knowing this concept because while we discussing about the right cause,
sometimes I use the word puppeteer somewhere.
But I tell that this court is going to be looking pretty much exactly like a puppeteer.
Then you shouldn't be surprised that what I really talking about puppeteer while this course is all
about playwrite, I mean, the patent is actually puppeteer and sometimes I will try to inherit the
puppeteer in my course.
But yeah, this is the reason behind it.
Well, you know what it is.
And just if you have time, just go ahead and play around with puppeteer.
And the Google team is also introducing many new features on puppeteer side by side, which player doesn't
really have.
But soon Playwrite will also catch up with the features.
While some of the features which is available on the playwright is already not there in Puppeteer,
it's just like that.