So the first thing we should be talking about in this particular Hands-On section is going to be once
again doing everything that we did in our earlier videos, like creating a project and quickly doing
the installations and creating a simple login test and things of that nature followed by that we'd be
talking about the whole Operation Finatawa and stuff.
I know it's kind of rápido.
You can probably skip this lecture if you want, because we have already.
Was that me doing that in our earlier sections?
You can skip this particular lecture, which is very, very safe for you to do at the moment.
But I'm going to do it again because we talked about a lot of things in our earlier sections.
This section is going to be like a wrap up, like a revision of what we already talked about it before.
So I'm just going to quickly do this.
I mean, once again, you are very, very safe to skip this particular lecture.
The most important lecture starts from the next lecture off this course.
But as of now, I'm just going to be creating over here and we'll see how it actually works.
So I'm just going to create a directory called a pseudonym, puppeteer, maybe basics like that.
And then I'm just going to go to the Udemy puppeteer underscore basics because we already have a former
student puppeteer.
And then I'm going to open the code exploration, which is going to open my visual studio called, you
know, these things already.
And I'm going to do a package Jasen, which is going to be creating the installation options.
So I'm going to be creating a dependency.
And you know that we need to call the playwright here.
And the version that we need to use is seven, because I am one.
Chip already has some issues with the one that's the one we discussed about that video.
So I'm going to be using that and then we're going to do an NPM install, which is going to do an installation
for us.
So you can see that this is all the things that we have already discussed many times in our videos,
and they work pretty much as expected.
Yeah, and I'm going to create a file starting from here.
Let me call this as a login to start over here.
And I'm going to be creating the code pretty much like how we did not only video, but I'm going to
change the syntax a bit this time.
If you remember in our earlier video, we used to do something like Consed of the Chromium and then
we do this require of the player.
Right?
So if you do this way, we will be calling the play right.
And this is going to call the chromium for you.
Right.
You can do it this way as well, or you can do it in a different way if you want to.
But I'm just going to tell you, like how we can actually do it and once again, need to create an asynchronous
arrow function because that's where you're going to be dealing with all the cards that you actually
have.
So this is the code block, which is going to execute things for you.
And over here, you're going to start writing that code.
So I'm going to call this as browser is equal to a weight of maybe chromium.
And you can see that instead of chromium, probably I'm just going to replace this guy from chromium
to maybe playwrite.
So this is what is the change I was talking about.
So you can use this playwrite as well.
And if you go to the playwright class or type, you could actually use the concern, something like
an array of the browsers that you want to use so you can specify the constants, something like Firefox
or Chrome or something like that.
From here itself, I'd say if I want to choose the Firefox and then you can call the launch method here
pretty much like how we did earlier video.
And over here we are going to call the Headless, which is going to be probably I'm going to say this
is false.
And then we can set the slowmo if you want to, let's say 50 like that.
And we can also open the door tools if we want to.
I mean, I'm just going to ignore this for now and you know that already.
So I'm just going to leave this guy and you can see that this is going to open the browser for us.
And you know already about the concept of the browser context and the pages and stuff.
So I'm just going to leave the context as it is, because I can just open that in a page, probably.
So I'm just going to open the browser dot new page instead of the new context, because this new page
is going to open the new tab.
And once this is opened, I think I forgot to wait.
And once this is opened, we're going to perform the navigation to the side and stuff.
I mean, those things are going to be pretty much exactly the same thing.
So I can just go to a Wade
Page dock, go to.
AWP as execute automation dot com is going to take a screenshot for this, and this time I'm just going
to take a screenshot based on the part which is going to be prefixed with my daytime aswell.
So it's going to be a bit different this time.
So I'm just going to do and string interpellation, but I'm just going to say the dot now and not call
this spange or something like that.
So this is going to take a screenshot for us and then I can just do an upgrade browser dot close, which
is going to close the browser for me completely.
I don't really require to close that page explicitly because once you close the browser, it's going
to close the page as well.
That's it.
So this is the thing that we are going to be doing in this particular lecture.
Again, we already talked about this a lot, but I just want to reconnect before it is too late or before
we start forgetting or figuring out the memory that we have gained already.
So I'm just going to call this a node of the log in to start Jass.
I just ask this.
You could see that it's going to open a Firefox browser for me and it opens things that automation dot
com.
Uh, and it would have probably taken a screenshot by now.
You can see that that is a screen shot coming up.
So that's it.
So this is a normal thing.
And guys, I we discussed about that a lot in our earlier sections.
That's what it is doing at the moment for us.
Pretty cool, right, Mintu, in our next lecture.