1
00:00:00,150 --> 00:00:05,280
So the first thing we should be talking about in this particular Hands-On section is going to be once

2
00:00:05,280 --> 00:00:10,650
again doing everything that we did in our earlier videos, like creating a project and quickly doing

3
00:00:10,650 --> 00:00:15,210
the installations and creating a simple login test and things of that nature followed by that we'd be

4
00:00:15,210 --> 00:00:17,710
talking about the whole Operation Finatawa and stuff.

5
00:00:17,730 --> 00:00:19,260
I know it's kind of rápido.

6
00:00:19,440 --> 00:00:22,600
You can probably skip this lecture if you want, because we have already.

7
00:00:22,620 --> 00:00:25,230
Was that me doing that in our earlier sections?

8
00:00:25,420 --> 00:00:30,120
You can skip this particular lecture, which is very, very safe for you to do at the moment.

9
00:00:30,270 --> 00:00:34,500
But I'm going to do it again because we talked about a lot of things in our earlier sections.

10
00:00:34,740 --> 00:00:40,260
This section is going to be like a wrap up, like a revision of what we already talked about it before.

11
00:00:40,470 --> 00:00:42,390
So I'm just going to quickly do this.

12
00:00:42,400 --> 00:00:45,860
I mean, once again, you are very, very safe to skip this particular lecture.

13
00:00:46,110 --> 00:00:49,740
The most important lecture starts from the next lecture off this course.

14
00:00:49,890 --> 00:00:54,240
But as of now, I'm just going to be creating over here and we'll see how it actually works.

15
00:00:54,480 --> 00:01:02,100
So I'm just going to create a directory called a pseudonym, puppeteer, maybe basics like that.

16
00:01:02,490 --> 00:01:09,140
And then I'm just going to go to the Udemy puppeteer underscore basics because we already have a former

17
00:01:09,430 --> 00:01:10,290
student puppeteer.

18
00:01:10,650 --> 00:01:15,810
And then I'm going to open the code exploration, which is going to open my visual studio called, you

19
00:01:15,810 --> 00:01:17,280
know, these things already.

20
00:01:17,880 --> 00:01:26,250
And I'm going to do a package Jasen, which is going to be creating the installation options.

21
00:01:26,460 --> 00:01:28,590
So I'm going to be creating a dependency.

22
00:01:28,920 --> 00:01:32,880
And you know that we need to call the playwright here.

23
00:01:33,240 --> 00:01:37,380
And the version that we need to use is seven, because I am one.

24
00:01:37,380 --> 00:01:42,620
Chip already has some issues with the one that's the one we discussed about that video.

25
00:01:42,810 --> 00:01:48,690
So I'm going to be using that and then we're going to do an NPM install, which is going to do an installation

26
00:01:48,690 --> 00:01:49,070
for us.

27
00:01:49,080 --> 00:01:54,780
So you can see that this is all the things that we have already discussed many times in our videos,

28
00:01:54,960 --> 00:01:57,520
and they work pretty much as expected.

29
00:01:57,680 --> 00:02:02,340
Yeah, and I'm going to create a file starting from here.

30
00:02:02,580 --> 00:02:05,400
Let me call this as a login to start over here.

31
00:02:05,940 --> 00:02:11,340
And I'm going to be creating the code pretty much like how we did not only video, but I'm going to

32
00:02:11,340 --> 00:02:13,050
change the syntax a bit this time.

33
00:02:13,530 --> 00:02:19,350
If you remember in our earlier video, we used to do something like Consed of the Chromium and then

34
00:02:19,350 --> 00:02:23,010
we do this require of the player.

35
00:02:23,010 --> 00:02:23,310
Right?

36
00:02:23,340 --> 00:02:25,920
So if you do this way, we will be calling the play right.

37
00:02:25,920 --> 00:02:27,870
And this is going to call the chromium for you.

38
00:02:27,870 --> 00:02:28,200
Right.

39
00:02:28,500 --> 00:02:32,660
You can do it this way as well, or you can do it in a different way if you want to.

40
00:02:32,670 --> 00:02:38,790
But I'm just going to tell you, like how we can actually do it and once again, need to create an asynchronous

41
00:02:38,790 --> 00:02:44,940
arrow function because that's where you're going to be dealing with all the cards that you actually

42
00:02:44,940 --> 00:02:45,510
have.

43
00:02:45,540 --> 00:02:48,990
So this is the code block, which is going to execute things for you.

44
00:02:49,560 --> 00:02:51,840
And over here, you're going to start writing that code.

45
00:02:52,230 --> 00:03:00,540
So I'm going to call this as browser is equal to a weight of maybe chromium.

46
00:03:00,960 --> 00:03:07,410
And you can see that instead of chromium, probably I'm just going to replace this guy from chromium

47
00:03:07,770 --> 00:03:09,170
to maybe playwrite.

48
00:03:09,210 --> 00:03:11,340
So this is what is the change I was talking about.

49
00:03:11,730 --> 00:03:14,250
So you can use this playwrite as well.

50
00:03:15,450 --> 00:03:22,950
And if you go to the playwright class or type, you could actually use the concern, something like

51
00:03:22,950 --> 00:03:30,780
an array of the browsers that you want to use so you can specify the constants, something like Firefox

52
00:03:30,780 --> 00:03:32,040
or Chrome or something like that.

53
00:03:32,040 --> 00:03:38,280
From here itself, I'd say if I want to choose the Firefox and then you can call the launch method here

54
00:03:38,460 --> 00:03:41,280
pretty much like how we did earlier video.

55
00:03:41,700 --> 00:03:50,280
And over here we are going to call the Headless, which is going to be probably I'm going to say this

56
00:03:50,280 --> 00:03:51,030
is false.

57
00:03:51,540 --> 00:03:57,600
And then we can set the slowmo if you want to, let's say 50 like that.

58
00:03:58,200 --> 00:04:01,310
And we can also open the door tools if we want to.

59
00:04:01,320 --> 00:04:04,140
I mean, I'm just going to ignore this for now and you know that already.

60
00:04:04,410 --> 00:04:08,790
So I'm just going to leave this guy and you can see that this is going to open the browser for us.

61
00:04:08,910 --> 00:04:15,180
And you know already about the concept of the browser context and the pages and stuff.

62
00:04:15,180 --> 00:04:20,520
So I'm just going to leave the context as it is, because I can just open that in a page, probably.

63
00:04:20,850 --> 00:04:27,030
So I'm just going to open the browser dot new page instead of the new context, because this new page

64
00:04:27,030 --> 00:04:28,190
is going to open the new tab.

65
00:04:28,980 --> 00:04:32,850
And once this is opened, I think I forgot to wait.

66
00:04:34,530 --> 00:04:39,780
And once this is opened, we're going to perform the navigation to the side and stuff.

67
00:04:39,780 --> 00:04:42,780
I mean, those things are going to be pretty much exactly the same thing.

68
00:04:42,780 --> 00:04:44,820
So I can just go to a Wade

69
00:04:47,310 --> 00:04:49,230
Page dock, go to.

70
00:04:51,580 --> 00:05:01,990
AWP as execute automation dot com is going to take a screenshot for this, and this time I'm just going

71
00:05:01,990 --> 00:05:09,790
to take a screenshot based on the part which is going to be prefixed with my daytime aswell.

72
00:05:10,090 --> 00:05:13,530
So it's going to be a bit different this time.

73
00:05:13,540 --> 00:05:23,050
So I'm just going to do and string interpellation, but I'm just going to say the dot now and not call

74
00:05:23,050 --> 00:05:25,360
this spange or something like that.

75
00:05:25,750 --> 00:05:33,520
So this is going to take a screenshot for us and then I can just do an upgrade browser dot close, which

76
00:05:33,520 --> 00:05:35,520
is going to close the browser for me completely.

77
00:05:35,770 --> 00:05:40,690
I don't really require to close that page explicitly because once you close the browser, it's going

78
00:05:40,690 --> 00:05:42,540
to close the page as well.

79
00:05:42,670 --> 00:05:43,120
That's it.

80
00:05:43,480 --> 00:05:47,380
So this is the thing that we are going to be doing in this particular lecture.

81
00:05:47,410 --> 00:05:53,320
Again, we already talked about this a lot, but I just want to reconnect before it is too late or before

82
00:05:53,320 --> 00:05:58,300
we start forgetting or figuring out the memory that we have gained already.

83
00:05:58,510 --> 00:06:02,170
So I'm just going to call this a node of the log in to start Jass.

84
00:06:02,180 --> 00:06:03,100
I just ask this.

85
00:06:03,490 --> 00:06:09,400
You could see that it's going to open a Firefox browser for me and it opens things that automation dot

86
00:06:09,430 --> 00:06:09,790
com.

87
00:06:10,400 --> 00:06:13,660
Uh, and it would have probably taken a screenshot by now.

88
00:06:13,810 --> 00:06:16,350
You can see that that is a screen shot coming up.

89
00:06:16,540 --> 00:06:17,320
So that's it.

90
00:06:17,380 --> 00:06:18,970
So this is a normal thing.

91
00:06:18,970 --> 00:06:22,720
And guys, I we discussed about that a lot in our earlier sections.

92
00:06:22,730 --> 00:06:25,520
That's what it is doing at the moment for us.

93
00:06:25,630 --> 00:06:28,300
Pretty cool, right, Mintu, in our next lecture.
