All right, so this is the same project that we are talking about in our Section one while we're talking
about the playwright, playwright, Kellyann and stuff, and in this video, we're going to start working
with some of the basic building blocks to understand things more clearer.
So I guess we already know about the browser a lot because it's pretty straightforward.
So if you create a chromium dot launch, then it's going to launch the browser as the chromium browser.
So if you're going to run a Firefox browser, you can do that as well.
So let me call this as like a browser dot JS and I'm just going to do the exact same code that we discussed
over here.
So let me just copy this just to save some time and I'm going to go to the browser Dages.
I'm going to pass it over here.
So instead of the chromium here, let's say I'm going to use Firefox, I'm just going to change this
to Firefox.
I'm just going to copy this.
I'm going to pass it over here.
I'm going to save this.
And if I try to run this particular test, let's say create new integrated terminal and I'm going to
do a node of browser Dargis.
And if I hit enter, you should see this time it is not going to launch the chromium browser.
Rather, this can launch a Firefox browser.
You can see that it is quite quiet lawyer like for the first time when it is launching.
That took a lot of time.
But it is launching, right?
I mean, it's working fine.
So this is a Firefox browser which just launched.
It is a costly operation.
I mean, every time it launches the browser, it took an enormous amount of time to launch the browser.
But if a machine is pretty faster, then you don't really see that particular difference.
But if a machine is lawyer, then you will really see that particular slow performance of that.
And similarly, you can launch the browser in various different way as well.
Like, if you remember, we launched this browser in a headless mode, something like headless as false.
And you can also do a lot of things for the browser, for example.
Let me change this to, let's say, chromium once again, and I will show you what I really mean.
So within this launch option over here, if I just try to do something like control space, you can
see that brings me up something like a dev tools, download pod, EMV, executable pod and things of
that nature.
So if I just try to do something like a dev tools and if I go to something like true, which means it's
going to show me that the old rules of that particular browser.
So if I try to run this node browser Dargis file, you can see that it enabled the Dowdle for me.
So it does the exact same thing like how you can do with the chromium options of selenium, where you
can set the desired capabilities of a chromium to set.
Sure.
Show tools and things of that nature.
It's exactly the same thing that you can do in selenium, but you can also do that in playwrite as well.
And similarly, you can also do something like said, the different executable parts of your chromium
if you want to, because at the moment we are using the chromium just sitting in our cash, but rather
you can also change the particular cash version to the directory that you want to specify so that it
will run that particular browser for you and somebody that is something called a slowmo.
This is very, very important or very, very handy while you try to debug your code and see what's been
typed while you run this particular slowmo.
I mean, once you run your test at the moment so I can probably go to our Vickki test.
If you remember, we were typing some value over there like Apple and one or something like that.
It was pretty fast.
We couldn't able to see that.
So I'm just going to do something like a slowmo and then I'm going to type the value, something like
five hundred or something like that.
I think maybe not five hundred, maybe thousand, something like that.
And then if I tried to run the node off with Ketut J.S. and if I hit the enter.
You can see that it has launched that Wikipedia and it took some time to type that value Apple in one
order.
So if you change that particular value to, let's say, five thousand, you will see that literally
more even more slower than what it has typed.
So each and every operation that it does for the apple and one is going to be very, very slow.
So you can see that it is quite, quite lawyer what it does to any operation over there, like those
long lines waiting for like five thousand milliseconds for every operation.
And then before it clicks the apple in one, it takes another five thousand milliseconds.
So it is quite slow.
So this is how it works with a slowmo operation and you can change the behavior of the browsers and
things from here as well.
I mean, you can set these behavior in your settings file if you want to.
But as of now, I'm just going to keep everything over here so that you understand what it is.
So this is what is browser, basically, and you can keep customizing this browser, using what is called
as a launch options.
So if you go to this interface launch options, you can see they have different options, like headless
executable pod arguments, ignore default args proxy's and a download pod Chrome Sandbox Firefox user
preference handle sign ups, timeout environments, dev tools and Solomont things of that nature.
We are going to customize that even further.
What we talked about when we talk about Playwrite Destructor, which is a separate section altogether,
we talk about that.
We will see how we can also parse these options like Shlomo's and hitless options and stuff from the
command line, which is going to be very, very helpful while we try running in the continuous integration
and continuous deployment.
So those things are very, very helpful while we try to create our own arguments in the test run or
in the playwright stroner.
And these are really, really handy and just understand that these are different options and properties
being set for the browser itself.
Now, next video, we'll talk about the browser context in even more detail.
And we understand how things work.