1
00:00:00,420 --> 00:00:06,860
So before we actually finish this particular section or into this section to move to the playwright

2
00:00:07,110 --> 00:00:10,530
drummer, I noticed two things that we need to address.

3
00:00:10,800 --> 00:00:16,980
The first one is my blunder mistake, which was I just named the particular project as the Udemy puppeteer

4
00:00:16,980 --> 00:00:17,340
basic.

5
00:00:17,340 --> 00:00:19,950
For some reason it's actually Udemy playwrite, basically.

6
00:00:19,950 --> 00:00:25,870
It's not your puppeteer, which was my bad actually, because the reason why I was giving this Asuda

7
00:00:25,870 --> 00:00:32,850
Udemy perpetuate itself is because we already had two folders within my directory and instead of giving

8
00:00:32,850 --> 00:00:39,060
us Udemy playwrite because you remember we gave this udemy puppeteer in our earlier section like section

9
00:00:39,060 --> 00:00:39,420
one.

10
00:00:39,610 --> 00:00:42,980
So I just used the same thing while doing the rename the tab.

11
00:00:42,990 --> 00:00:44,730
It just became a security puppeteer.

12
00:00:44,730 --> 00:00:49,830
But I was actually but actually I was trying to call this a pseudo playwright and it became like a puppeteer

13
00:00:49,830 --> 00:00:50,520
for some reason.

14
00:00:50,700 --> 00:00:51,480
Sorry about that.

15
00:00:51,660 --> 00:00:55,860
It was my bad and it is actually Udemy right now, dude.

16
00:00:55,860 --> 00:01:00,540
I mean, puppeteer BASIX or whatever we discussed before is Udemy is basically a playwright called,

17
00:01:00,750 --> 00:01:02,400
so it's not puppeteer.

18
00:01:02,700 --> 00:01:08,550
But right now what I'm going to do is we are actually going to look at the Udemy puppeteer folder itself,

19
00:01:08,550 --> 00:01:11,940
that the project that we earlier discussed sort of confused about it.

20
00:01:12,090 --> 00:01:16,360
I just wanted to show you a new feature which is already there in Puppet.

21
00:01:16,550 --> 00:01:16,950
Just nothing.

22
00:01:16,950 --> 00:01:21,380
But the just puppeteer is nothing but a destroyer which is available in puppeteer.

23
00:01:21,570 --> 00:01:26,280
I just wanted to show you in this section so that you can refrain it while we talk about it in our next

24
00:01:26,280 --> 00:01:28,520
section about the playwright Pastrana.

25
00:01:28,530 --> 00:01:34,880
So puppeteer team, they introduced a test runner and they called us Just Puppeteer, which is like

26
00:01:34,920 --> 00:01:35,610
a test runner.

27
00:01:35,820 --> 00:01:41,340
I just wanted to show you that before we talk about the playwright testing on our next section, because

28
00:01:41,340 --> 00:01:46,500
you will get an idea of what Destrehan is, because all these days we have been running tests only using

29
00:01:46,800 --> 00:01:49,050
this particular atto functions.

30
00:01:49,050 --> 00:01:53,850
And this is not the method that we always try to run a whole test like this, like wrapping up everything

31
00:01:53,850 --> 00:01:54,450
over here.

32
00:01:54,660 --> 00:01:59,760
We'll be writing a more better and perfect way, and that's what we will be doing in this particular

33
00:01:59,760 --> 00:02:00,210
section.

34
00:02:00,330 --> 00:02:03,770
But before that, I also wanted to show you what is just puppeteers and stuff.

35
00:02:03,810 --> 00:02:09,450
So if I go to this particular website, like, just start, I just so this is a test run which is going

36
00:02:09,450 --> 00:02:14,820
to be useful or for many different frameworks like not just like puppeteer, but also the support many

37
00:02:14,820 --> 00:02:23,610
different tools like puppeteer, Mongo DB dynamic that pack like modules, Marte's and stuff like that,

38
00:02:23,820 --> 00:02:25,410
support of almost many things.

39
00:02:25,650 --> 00:02:30,120
And for the puppeteer they do support using what is called just puppeteer.

40
00:02:30,120 --> 00:02:35,520
So this is like another type of rapport which the team is actually supporting as well.

41
00:02:35,520 --> 00:02:41,820
So if you go to this particular just a puppeteer, you can see that they have some sort of features

42
00:02:41,820 --> 00:02:42,300
over here.

43
00:02:42,570 --> 00:02:45,060
They also are looking for some maintainers.

44
00:02:45,060 --> 00:02:48,900
I mean, it looks like this particular rapport is not very actively maintained.

45
00:02:48,900 --> 00:02:54,240
And that's the reason Playwrite Pastrana is amazing, which we're talking about the next election.

46
00:02:54,480 --> 00:03:01,110
But I just wanted to give you a heads up before we actually talk about the playwright itself so you

47
00:03:01,110 --> 00:03:06,690
can see that the setting up is kind of a bit more strange in this particular just puppeteer.

48
00:03:06,870 --> 00:03:10,590
But I just wanted to quickly get into that and I will show you what I really mean.

49
00:03:10,890 --> 00:03:19,710
So if I just go to the Udemy, I mean, for the first time, I will just go correctly to Udemy la puppeteer.

50
00:03:21,030 --> 00:03:22,230
This is what we need to go.

51
00:03:22,620 --> 00:03:30,150
I think it's the puppeteer demo, and then if I just go to the cord exploration dot that's going to

52
00:03:30,150 --> 00:03:35,590
open the project for us over here, you can see that this is the enemy puppeteer demo.

53
00:03:35,640 --> 00:03:37,000
So this is correct folder.

54
00:03:37,020 --> 00:03:39,900
This is the thing that we discussed in Section one.

55
00:03:40,110 --> 00:03:44,160
And over here, we're going to actually do a couple of insolation.

56
00:03:44,160 --> 00:03:50,970
So not only just puppeteer, but also we are going to do a couple more additional installation this

57
00:03:50,970 --> 00:03:51,240
time.

58
00:03:51,570 --> 00:03:54,080
The one is the just puppeteer itself.

59
00:03:54,090 --> 00:04:00,080
So I'm just going to search for just and if I search for a puppeteer, you can see that this is the

60
00:04:00,270 --> 00:04:08,880
puppeteer comes in and it also requires a just environment, nor does something like that.

61
00:04:08,920 --> 00:04:11,760
So let's see if they have one.

62
00:04:14,300 --> 00:04:20,770
Yeah, this one, so I do require this as well, so I'm just going to do this as well over here.

63
00:04:20,780 --> 00:04:25,340
So once I have everything over here, I can just do and npm install.

64
00:04:25,520 --> 00:04:28,940
So this is going to install all the packages for me while this is happening.

65
00:04:29,130 --> 00:04:34,580
If I just go to this particular documentation, you can see that they will ask us to set this particular

66
00:04:34,580 --> 00:04:41,750
preset for that just because that is something we really require on our package to our Jason file.

67
00:04:41,770 --> 00:04:43,610
So I'm just going to do that.

68
00:04:44,090 --> 00:04:53,270
And I also need to probably create the configuration file, which is going to be looking something like

69
00:04:53,270 --> 00:04:55,670
this, the disrupter config, Dargis file.

70
00:04:55,790 --> 00:04:57,740
I mean, you don't have to worry about all these things.

71
00:04:57,740 --> 00:05:02,870
I'm just running it very quickly because while we talk about the player, I guess you would understand

72
00:05:02,870 --> 00:05:04,800
why these are really, really important.

73
00:05:05,120 --> 00:05:08,120
So I'm just going to copy them pasted over here.

74
00:05:08,870 --> 00:05:13,740
And you can see that it just brings up all those things for us, which is quite good.

75
00:05:14,300 --> 00:05:22,700
So I'm just going to stay this thing and now I am going to actually run the actual test itself so far

76
00:05:22,700 --> 00:05:23,300
doing that.

77
00:05:24,220 --> 00:05:33,310
I'm actually going to create a file that's called this as a test dart spec Dargis, do you see that?

78
00:05:33,310 --> 00:05:41,260
I'm just changing the name from the usual Dargis to Dart Specter just this time.

79
00:05:41,260 --> 00:05:43,810
So the spec is basically for the specification.

80
00:05:43,840 --> 00:05:45,720
I mean, especially for the test cases that we used to.

81
00:05:45,720 --> 00:05:46,030
Right.

82
00:05:46,690 --> 00:05:51,150
And just actually uses that as one of the common way of identifying it.

83
00:05:51,460 --> 00:05:57,040
So now, because you have the test, if you try to do just just a command, like just if you try to

84
00:05:57,040 --> 00:06:01,650
run that, you can see that it is trying to determine the test suite to run.

85
00:06:01,660 --> 00:06:06,700
So it is trying to identify it and it is trying to find if there is any test that it could be able to

86
00:06:06,700 --> 00:06:08,890
execute in this particular directory.

87
00:06:08,920 --> 00:06:16,840
And it has this year to start spectrographs file and you can see that it actually executed it and it

88
00:06:16,840 --> 00:06:18,040
wouldn't be able to find anything.

89
00:06:18,040 --> 00:06:24,040
So it says that you are test suite must contain at least one test in that and able to find anything

90
00:06:24,340 --> 00:06:27,940
to stop and just is also going to do some sort of magic.

91
00:06:28,030 --> 00:06:35,260
Because if you see that I'm trying to run a dumped out of truth, I probably can remove this guy and

92
00:06:35,260 --> 00:06:38,980
even this guy because he's trying to run our process and had less modern stuff.

93
00:06:40,300 --> 00:06:42,980
But yeah, you can see that this is what it is trying to do.

94
00:06:43,180 --> 00:06:49,150
So if I just try to run the test once again, you can see that this time it is quite faster because

95
00:06:49,150 --> 00:06:51,610
it's not running all this potent stuff for us.

96
00:06:51,790 --> 00:06:53,590
I mean, you don't have to worry about all these things.

97
00:06:53,590 --> 00:06:56,130
It is because test is doing a lot of things behind the scenes.

98
00:06:56,470 --> 00:06:59,860
You can see that I'm setting the browser chromium over here itself.

99
00:07:00,100 --> 00:07:05,020
I'm setting the browser context here itself, which I don't really have to specify, like how I used

100
00:07:05,020 --> 00:07:10,900
to specify for each and every test in our playwrite test that we use to do most of the time.

101
00:07:11,080 --> 00:07:15,370
Those things we don't even have to do using the just puppeteer, which is pretty cool.

102
00:07:15,520 --> 00:07:22,750
But as I said, I'm asking a random test on the EPA to Specter G.S. and will quickly show you how the

103
00:07:22,750 --> 00:07:23,620
court's going to look like.

104
00:07:23,620 --> 00:07:28,570
You can see that this a described block that it block and that is done before all block.

105
00:07:28,750 --> 00:07:32,500
So before I'll block it, it's going to run this Google dot com.

106
00:07:32,800 --> 00:07:38,380
And over here it is going to, ah, just match the title as Google or something like that.

107
00:07:38,400 --> 00:07:39,960
So very, very simple test.

108
00:07:40,630 --> 00:07:45,730
So if I run this just once again, you can see that it is going to execute the test for us.

109
00:07:46,450 --> 00:07:46,960
There you go.

110
00:07:47,290 --> 00:07:50,010
It got past this time, but it's pretty cool, right?

111
00:07:50,020 --> 00:07:54,850
So this just is actually like a test runner, which is going to do things for us so quickly.

112
00:07:55,060 --> 00:08:00,970
Not only that, it also resolves the page instance automatically based on the browser that we have told

113
00:08:00,970 --> 00:08:04,280
it to open, and it just launches that as well.

114
00:08:04,660 --> 00:08:13,690
So if you because we have just removed the the launch pad from the headless two files, we can probably

115
00:08:13,690 --> 00:08:19,540
say, oh, here, like false, somewhat wrong.

116
00:08:21,750 --> 00:08:27,960
And if I tried Ramdas, you can see that it just opens the chromium browser for us over here in full

117
00:08:27,960 --> 00:08:29,080
mode and is executing it.

118
00:08:29,100 --> 00:08:33,030
So all those things we can control from the config file from here, which is quite nice.

119
00:08:33,600 --> 00:08:39,930
So this is the very important thing about the test itself on that just puppeteer.

120
00:08:40,140 --> 00:08:46,020
Well this is the same exact idea that will be propagating in our playwrite in our next section.
