1
00:00:01,530 --> 00:00:06,780
Welcome to another section of our course, intend to start a nation with playwright, and in this section

2
00:00:06,780 --> 00:00:09,020
we are going to talk about best runners.

3
00:00:09,390 --> 00:00:16,260
So all these time, like until the last section we were discussing about the basics of playwrite and

4
00:00:16,260 --> 00:00:22,320
what is playwrite and how to install playwrite and stuff, but we have not seen an actual way to run

5
00:00:22,320 --> 00:00:22,990
the test.

6
00:00:23,010 --> 00:00:29,010
I mean, all this time we have been using the, I think Arrow method and that arrow method is not the

7
00:00:29,010 --> 00:00:30,230
way we actually run the test.

8
00:00:30,240 --> 00:00:30,490
Right.

9
00:00:30,510 --> 00:00:33,990
I mean, we should have a way to run the test in an organized manner.

10
00:00:34,230 --> 00:00:41,270
So we also saw in our earlier section about a test runner concept, which puppeteer actually has caught.

11
00:00:41,370 --> 00:00:44,280
I mean, that was a test run or just part puppeteer.

12
00:00:44,430 --> 00:00:47,280
And the puppeteer was pretty interesting as well.

13
00:00:47,520 --> 00:00:53,430
The same kind of test runner is also available in playwrite, and that's exactly what we'll be discussing

14
00:00:53,430 --> 00:00:54,480
in this particular section.

15
00:00:54,750 --> 00:01:00,020
The puppeteer has got a dozen oncologist's puppeteer and playwrite, has got a testimonial called US

16
00:01:00,030 --> 00:01:01,110
Playwrite Test Runner.

17
00:01:01,140 --> 00:01:02,590
And that's what we'll be discussing.

18
00:01:02,610 --> 00:01:04,710
I mean, we already discussed about this a bit.

19
00:01:04,710 --> 00:01:06,630
We know about that, how it works and stuff.

20
00:01:06,630 --> 00:01:10,080
But in this section, we are going to discuss fully on the playwright Turner.

21
00:01:10,740 --> 00:01:17,220
So Petraitis Turner is a zero config cross browser into and testing for Web browser automation with

22
00:01:17,220 --> 00:01:22,800
playwrite just like assertion and build in support of typescript, which is pretty cool and playwrite

23
00:01:23,220 --> 00:01:27,080
is available in prevue and a minor breaking change could happen.

24
00:01:27,120 --> 00:01:32,400
That's what that's what the report actually says, because this is still in the preview stage and it

25
00:01:32,400 --> 00:01:35,190
is not there yet like like a full version yet.

26
00:01:35,640 --> 00:01:39,600
But I'm definitely sure that the feature which it offers is pretty awesome.

27
00:01:39,600 --> 00:01:45,180
And definitely even though there is going to be a breaking change, it is not going to be a lot.

28
00:01:45,300 --> 00:01:49,760
And also there'll be more like an enhancement rather than breaking change itself.

29
00:01:50,070 --> 00:01:54,390
So it looks pretty good like the player does and looks pretty awesome while working with it.

30
00:01:54,900 --> 00:01:58,010
And the installation of playwrite is also very, very simple.

31
00:01:58,050 --> 00:01:59,760
All we do is npm.

32
00:01:59,760 --> 00:02:02,530
I hyphen D playwright August test.

33
00:02:02,550 --> 00:02:06,480
If you do that it is going to install the playwright astronomer on the playwright itself.

34
00:02:07,560 --> 00:02:14,100
And when it comes to the children are like, if you have worked with other test runners in other languages

35
00:02:14,100 --> 00:02:18,990
like C, Charlotte or something called us in our most similarly in Java, there is something called

36
00:02:19,200 --> 00:02:21,760
Destiny Junod and things up.

37
00:02:21,960 --> 00:02:28,680
And similarly, in JavaScript world, the most famous is like Mocca, just these are some other famous

38
00:02:28,700 --> 00:02:29,600
Dustan available.

39
00:02:29,670 --> 00:02:34,740
But these are the destroyers which are restricted to its own capabilities.

40
00:02:34,770 --> 00:02:40,800
You cannot really extend the test itself a lot like you cannot customize everything on the test, but

41
00:02:40,920 --> 00:02:47,100
you could be able to actually customize the designer based on your requirement in this particular questionnaire,

42
00:02:47,160 --> 00:02:50,180
which I'll probably talk to talk about the upcoming lectures.

43
00:02:50,190 --> 00:02:55,530
But yes, this is what is the idea of this test run and the basic test block that is going to look like

44
00:02:55,800 --> 00:03:00,360
in this particular test is going to look something like this or it's going to have a blog and describe

45
00:03:00,360 --> 00:03:01,140
blog and things.

46
00:03:01,410 --> 00:03:05,780
And in the blog you're going to specify an atomic test.

47
00:03:05,790 --> 00:03:09,420
So basically, this is going to be an independent test, which is going to be sitting on this particular

48
00:03:09,420 --> 00:03:10,020
ID block.

49
00:03:10,020 --> 00:03:14,190
So it says basic test, verify the login button in the neocon page or not.

50
00:03:14,580 --> 00:03:15,970
So if you want to do that.

51
00:03:15,990 --> 00:03:20,940
So this is the code which is going to look like like you have in context over here.

52
00:03:21,150 --> 00:03:27,180
And within this context, you're going to be actually calling the new page and then pasar go to the

53
00:03:27,360 --> 00:03:32,040
website and then you're going to wait for this button and then going to write on the log.

54
00:03:32,070 --> 00:03:32,490
That's it.

55
00:03:32,610 --> 00:03:35,580
And you can ask me like what is this page being said.

56
00:03:35,580 --> 00:03:40,530
Like what is this context, where is the browser being set and where is the browser, is property being

57
00:03:40,530 --> 00:03:40,830
set.

58
00:03:41,070 --> 00:03:44,280
I mean those things are actually being set from the test.

59
00:03:44,700 --> 00:03:49,670
That is the same idea that we discussed on the just property in our earlier section.

60
00:03:49,680 --> 00:03:52,110
That's exactly that's exactly the same idea.

61
00:03:52,140 --> 00:03:54,650
Probably got here in the playwright, astronaut, assman.

62
00:03:54,750 --> 00:03:59,250
And that's the reason I actually showed you the just puppeteer in an earlier section and then putting

63
00:03:59,250 --> 00:04:00,800
it all together with the described block.

64
00:04:00,810 --> 00:04:02,610
The court is going to look something like this.

65
00:04:02,610 --> 00:04:06,840
As you can see, it has and described block and it has an ID block.

66
00:04:06,840 --> 00:04:10,890
I mean, you can have any number of ID blocks in this particular code and you can see that I'm trying

67
00:04:10,890 --> 00:04:13,890
to import it and expect from the right test here.

68
00:04:13,890 --> 00:04:18,000
I mean, you can import the described block as well from the right and all those things, which it's

69
00:04:18,000 --> 00:04:18,540
just work.

70
00:04:18,780 --> 00:04:24,840
And in the playwright distracter, there are different ways that you can run the test from the console.

71
00:04:24,840 --> 00:04:29,610
I mean, that is the whole idea of the designer, the way that you can use the designer from the command

72
00:04:29,610 --> 00:04:31,550
line is the power of the designers itself.

73
00:04:31,560 --> 00:04:37,290
So you can just pass something like NPCs are Foleo, which means you can run all the test on Chrome,

74
00:04:37,470 --> 00:04:38,910
Firefox and Web kit.

75
00:04:39,030 --> 00:04:44,280
And if you specify and Foleo hyphen Ambros, a name is called the Chromium, that you're going to run

76
00:04:44,280 --> 00:04:47,970
the test on the chromium browser alone, which is pretty cool.

77
00:04:47,970 --> 00:04:54,150
So you have the control over running the test from the command line, the browser that you really want

78
00:04:54,150 --> 00:04:56,340
to like, specific browsers and things.

79
00:04:56,580 --> 00:05:01,080
And similarly, you can specify Perama if headful, which means you can run the test on the headful

80
00:05:01,080 --> 00:05:03,990
mode and by default it has had lots more similar.

81
00:05:04,000 --> 00:05:09,690
You can specify the problem of slowmo screenshot on failure videos and retries and things.

82
00:05:09,690 --> 00:05:13,110
So all those things are going to be taken care of for you by the test.

83
00:05:13,350 --> 00:05:19,050
And you don't really have to specify anything on the browser like we used to do that hitless dev tools

84
00:05:19,050 --> 00:05:21,870
and videos and all those things, those things.

85
00:05:21,870 --> 00:05:23,220
You don't really have to do it right now.

86
00:05:23,220 --> 00:05:26,990
I mean, the play like test is going to do it for you, which is quite awesome.

87
00:05:28,170 --> 00:05:31,770
Well, I mean, talking about this Foleo Foleo in all these commands.

88
00:05:32,100 --> 00:05:33,420
So what is this Foleo?

89
00:05:33,810 --> 00:05:39,780
Well, Fotios a customizable test framework to build your own test frameworks and the foundation for

90
00:05:39,780 --> 00:05:44,850
the test is this FOLIA, which is very, very important to understand.

91
00:05:44,850 --> 00:05:49,380
I mean, we've been talking about Foleo a lot in our upcoming lectures off this section.

92
00:05:49,530 --> 00:05:51,090
But yes, this is what is Foleo.

93
00:05:51,090 --> 00:05:53,160
And just please bear with me.

94
00:05:53,160 --> 00:05:58,050
As of now, it looks pretty new and everything looks pretty new, but we'll be discussing about that

95
00:05:58,050 --> 00:05:59,820
in this particular section a lot.

96
00:06:00,090 --> 00:06:03,000
Let's quickly see everything in action and how things work so far.

97
00:06:03,000 --> 00:06:05,640
That media next lecture.
