1
00:00:00,210 --> 00:00:05,550
Well, before we jump into our next section, I also wanted to take some time to talk about some of

2
00:00:05,550 --> 00:00:07,420
the history of the playwright itself.

3
00:00:08,040 --> 00:00:14,940
Playwright actually started as a tool called Puppeteer and Puppeteer is actually told by the Google

4
00:00:14,940 --> 00:00:19,760
team and playwright is now actually developed and maintained by Microsoft team.

5
00:00:20,220 --> 00:00:27,360
But initially, while the playwright was released, it was actually putting all the code directly from

6
00:00:27,360 --> 00:00:31,200
puppeteer to a new report called US Playwright.

7
00:00:31,200 --> 00:00:35,100
Like in 2020, like an early 2020, all these things happened.

8
00:00:35,370 --> 00:00:41,970
Well, I released a course called Puppeteer Corsages and Playwrite in twenty eighteen.

9
00:00:42,210 --> 00:00:46,050
Well it least the cause it was actually fully focused on puppeteer.

10
00:00:46,260 --> 00:00:50,550
But later, once the playwright was released, I ordered the support for that in the course as well

11
00:00:50,550 --> 00:00:53,370
because both of them were pretty, pretty similar.

12
00:00:53,670 --> 00:00:58,830
So in order to just show you what it is, if you have never heard about Puppeteer, if just go all the

13
00:00:58,830 --> 00:00:59,780
way over here.

14
00:00:59,790 --> 00:01:07,290
So if I just open something called a puppeteer, you can see that there is something called a puppeteer.

15
00:01:07,950 --> 00:01:12,360
They have a site called Peter Deve, which is puppeteer basically.

16
00:01:12,720 --> 00:01:17,400
And this site actually has got all the information on the puppeteer itself.

17
00:01:17,400 --> 00:01:22,500
So you can see that they have the same kind of installation like in I of Puppeteer.

18
00:01:22,860 --> 00:01:28,300
And then they also have something called a puppeteer core, which is going to have only the puppeteer

19
00:01:28,350 --> 00:01:31,230
without the chromium that we just downloaded, if you remember.

20
00:01:31,570 --> 00:01:38,910
And it also has got the same sort of coding logics like how we wrote, because, as you know, puppeteer

21
00:01:38,910 --> 00:01:41,540
is actually the parent of playwrite itself.

22
00:01:41,550 --> 00:01:47,100
So the coding is going to look a bit of more similarity and they are going to look pretty much exactly

23
00:01:47,100 --> 00:01:49,980
the same way how we wrote the code on play.

24
00:01:49,980 --> 00:01:50,270
Right.

25
00:01:50,400 --> 00:01:52,580
So, yes, that's how it's going to be looking like.

26
00:01:52,590 --> 00:01:57,480
In fact, the features that we discussed on the playwright is already there in Puppeteer, and most

27
00:01:57,480 --> 00:02:01,680
of the feature, which is there in Puppeteer, may not be there in playwrite because now they are two

28
00:02:01,680 --> 00:02:06,200
different rapports and they're not going to be maintained like same rapport together.

29
00:02:06,240 --> 00:02:07,800
They're completely different things at the moment.

30
00:02:08,100 --> 00:02:14,820
So what I'm going to do is I'm just going to create a new project within this particular report just

31
00:02:14,820 --> 00:02:15,480
to show you.

32
00:02:15,630 --> 00:02:26,240
And I'm just going to go out and I'm going to call this as M.K. Are you dummy puppeteer Demo and KDDI

33
00:02:26,250 --> 00:02:28,290
Udemy Puppeteer demo.

34
00:02:28,650 --> 00:02:37,590
And I'm just going to put the code expiration date and I'm going to quickly create the same kind of

35
00:02:37,590 --> 00:02:41,580
file like package Dages on and over here.

36
00:02:41,580 --> 00:02:49,920
I'm just going to create the dev dependencies and I'm going to create something called S Puppeteer.

37
00:02:51,570 --> 00:02:57,150
So this is the latest version and I'm just going to open the terminal.

38
00:02:57,280 --> 00:03:00,120
I'm going to do and npm install.

39
00:03:00,900 --> 00:03:03,420
So this is going to install the puppeteer for me.

40
00:03:03,720 --> 00:03:08,100
And you can see that once it installs the puppeteer, it is also going to download the chromium.

41
00:03:08,340 --> 00:03:11,640
But this is going to download the chromium in a different cache, basically.

42
00:03:11,970 --> 00:03:19,200
So earlier it was downloading the chromium Firefox and everything on my cache called as Imust playwrite.

43
00:03:19,320 --> 00:03:23,420
But right now it is downloading in a different cache altogether.

44
00:03:23,460 --> 00:03:31,020
So I'm just going to run or write a simple code over here, like first test dart G.S..

45
00:03:31,350 --> 00:03:36,600
I'm going to go to their website right now, copied a similar code that we just wrote, and I'm going

46
00:03:36,600 --> 00:03:37,680
to pass it over here.

47
00:03:37,920 --> 00:03:38,880
I'm gonna save this.

48
00:03:39,780 --> 00:03:42,780
You can see that the same intelligence works over here as well.

49
00:03:42,990 --> 00:03:45,460
Those are going to remain pretty much exactly the same.

50
00:03:45,480 --> 00:03:46,710
There is no change on that.

51
00:03:47,100 --> 00:03:53,610
And then I'm just going to like Naude our first, just so you can see that the test is actually running

52
00:03:53,610 --> 00:03:58,090
behind the scene and it's going to take a screen shot for us as exampled are being.

53
00:03:58,350 --> 00:04:02,370
And it's going to put that for us on this particular directory probably.

54
00:04:05,200 --> 00:04:05,650
Oops.

55
00:04:06,190 --> 00:04:09,580
It seems like there is something wrong going on while I try to run that.

56
00:04:09,760 --> 00:04:17,500
Let me try changing the headless option to false so that we can see what's really going on.

57
00:04:17,860 --> 00:04:18,940
And if I had to enter.

58
00:04:21,220 --> 00:04:25,100
You can see the browser is actually coming in, but the site can't be reached at the moment.

59
00:04:25,120 --> 00:04:26,290
Maybe it's because of that.

60
00:04:26,650 --> 00:04:29,530
Maybe I'm going to change this to execute automation.

61
00:04:29,620 --> 00:04:31,390
And I'm not close this.

62
00:04:31,390 --> 00:04:32,700
I'm running the test once again.

63
00:04:35,070 --> 00:04:39,960
So you can see that the site is actually being loaded, which is quite good, and it has also taken

64
00:04:39,960 --> 00:04:40,600
the screenshot.

65
00:04:40,620 --> 00:04:46,110
If I'm not wrong, so the example that being is actually our website coming in so you can see that it

66
00:04:46,110 --> 00:04:47,360
is working fine as well.

67
00:04:47,370 --> 00:04:53,580
So this is what is puppeteer and the puppeteer team actually has got what is called as a test runner.

68
00:04:53,590 --> 00:04:59,130
They called us like a just puppeteer, which is going to be like a test runner where you can run your

69
00:04:59,130 --> 00:05:06,360
test pretty much like how you have test runners in Java like Jay, you are testing and in C Sharp you

70
00:05:06,360 --> 00:05:09,200
have something called a must test and in unit unit.

71
00:05:09,450 --> 00:05:13,000
So all those test runners are available for a puppeteer as well.

72
00:05:13,020 --> 00:05:15,600
So this is exactly what is puppeteer tool.

73
00:05:15,780 --> 00:05:22,050
And basically you need to be knowing this concept because while we discussing about the right cause,

74
00:05:22,050 --> 00:05:24,630
sometimes I use the word puppeteer somewhere.

75
00:05:24,840 --> 00:05:28,950
But I tell that this court is going to be looking pretty much exactly like a puppeteer.

76
00:05:28,950 --> 00:05:33,210
Then you shouldn't be surprised that what I really talking about puppeteer while this course is all

77
00:05:33,210 --> 00:05:39,990
about playwrite, I mean, the patent is actually puppeteer and sometimes I will try to inherit the

78
00:05:40,680 --> 00:05:42,870
puppeteer in my course.

79
00:05:42,870 --> 00:05:44,520
But yeah, this is the reason behind it.

80
00:05:45,060 --> 00:05:46,500
Well, you know what it is.

81
00:05:46,500 --> 00:05:50,940
And just if you have time, just go ahead and play around with puppeteer.

82
00:05:51,120 --> 00:05:56,160
And the Google team is also introducing many new features on puppeteer side by side, which player doesn't

83
00:05:56,160 --> 00:05:56,700
really have.

84
00:05:56,850 --> 00:05:59,760
But soon Playwrite will also catch up with the features.

85
00:05:59,940 --> 00:06:04,550
While some of the features which is available on the playwright is already not there in Puppeteer,

86
00:06:04,620 --> 00:06:05,700
it's just like that.
