Welcome to another section of our course, intend to start a nation with playwright, and in this section
we are going to talk about best runners.
So all these time, like until the last section we were discussing about the basics of playwrite and
what is playwrite and how to install playwrite and stuff, but we have not seen an actual way to run
the test.
I mean, all this time we have been using the, I think Arrow method and that arrow method is not the
way we actually run the test.
Right.
I mean, we should have a way to run the test in an organized manner.
So we also saw in our earlier section about a test runner concept, which puppeteer actually has caught.
I mean, that was a test run or just part puppeteer.
And the puppeteer was pretty interesting as well.
The same kind of test runner is also available in playwrite, and that's exactly what we'll be discussing
in this particular section.
The puppeteer has got a dozen oncologist's puppeteer and playwrite, has got a testimonial called US
Playwrite Test Runner.
And that's what we'll be discussing.
I mean, we already discussed about this a bit.
We know about that, how it works and stuff.
But in this section, we are going to discuss fully on the playwright Turner.
So Petraitis Turner is a zero config cross browser into and testing for Web browser automation with
playwrite just like assertion and build in support of typescript, which is pretty cool and playwrite
is available in prevue and a minor breaking change could happen.
That's what that's what the report actually says, because this is still in the preview stage and it
is not there yet like like a full version yet.
But I'm definitely sure that the feature which it offers is pretty awesome.
And definitely even though there is going to be a breaking change, it is not going to be a lot.
And also there'll be more like an enhancement rather than breaking change itself.
So it looks pretty good like the player does and looks pretty awesome while working with it.
And the installation of playwrite is also very, very simple.
All we do is npm.
I hyphen D playwright August test.
If you do that it is going to install the playwright astronomer on the playwright itself.
And when it comes to the children are like, if you have worked with other test runners in other languages
like C, Charlotte or something called us in our most similarly in Java, there is something called
Destiny Junod and things up.
And similarly, in JavaScript world, the most famous is like Mocca, just these are some other famous
Dustan available.
But these are the destroyers which are restricted to its own capabilities.
You cannot really extend the test itself a lot like you cannot customize everything on the test, but
you could be able to actually customize the designer based on your requirement in this particular questionnaire,
which I'll probably talk to talk about the upcoming lectures.
But yes, this is what is the idea of this test run and the basic test block that is going to look like
in this particular test is going to look something like this or it's going to have a blog and describe
blog and things.
And in the blog you're going to specify an atomic test.
So basically, this is going to be an independent test, which is going to be sitting on this particular
ID block.
So it says basic test, verify the login button in the neocon page or not.
So if you want to do that.
So this is the code which is going to look like like you have in context over here.
And within this context, you're going to be actually calling the new page and then pasar go to the
website and then you're going to wait for this button and then going to write on the log.
That's it.
And you can ask me like what is this page being said.
Like what is this context, where is the browser being set and where is the browser, is property being
set.
I mean those things are actually being set from the test.
That is the same idea that we discussed on the just property in our earlier section.
That's exactly that's exactly the same idea.
Probably got here in the playwright, astronaut, assman.
And that's the reason I actually showed you the just puppeteer in an earlier section and then putting
it all together with the described block.
The court is going to look something like this.
As you can see, it has and described block and it has an ID block.
I mean, you can have any number of ID blocks in this particular code and you can see that I'm trying
to import it and expect from the right test here.
I mean, you can import the described block as well from the right and all those things, which it's
just work.
And in the playwright distracter, there are different ways that you can run the test from the console.
I mean, that is the whole idea of the designer, the way that you can use the designer from the command
line is the power of the designers itself.
So you can just pass something like NPCs are Foleo, which means you can run all the test on Chrome,
Firefox and Web kit.
And if you specify and Foleo hyphen Ambros, a name is called the Chromium, that you're going to run
the test on the chromium browser alone, which is pretty cool.
So you have the control over running the test from the command line, the browser that you really want
to like, specific browsers and things.
And similarly, you can specify Perama if headful, which means you can run the test on the headful
mode and by default it has had lots more similar.
You can specify the problem of slowmo screenshot on failure videos and retries and things.
So all those things are going to be taken care of for you by the test.
And you don't really have to specify anything on the browser like we used to do that hitless dev tools
and videos and all those things, those things.
You don't really have to do it right now.
I mean, the play like test is going to do it for you, which is quite awesome.
Well, I mean, talking about this Foleo Foleo in all these commands.
So what is this Foleo?
Well, Fotios a customizable test framework to build your own test frameworks and the foundation for
the test is this FOLIA, which is very, very important to understand.
I mean, we've been talking about Foleo a lot in our upcoming lectures off this section.
But yes, this is what is Foleo.
And just please bear with me.
As of now, it looks pretty new and everything looks pretty new, but we'll be discussing about that
in this particular section a lot.
Let's quickly see everything in action and how things work so far.
That media next lecture.