1
00:00:00,400 --> 00:00:06,400
In this lecture, we are going to talk about how we can actually take a video capture of the operation

2
00:00:06,400 --> 00:00:07,460
that we are actually performing.

3
00:00:07,480 --> 00:00:10,620
So this is also one of the nice things that you can do with your testing.

4
00:00:10,960 --> 00:00:12,930
So I'm going to create a new file.

5
00:00:12,940 --> 00:00:17,800
I'm going to call this as video captured on G.S. or something like that.

6
00:00:18,130 --> 00:00:22,510
And then I'm going to copy paste exactly the same code that we always use.

7
00:00:22,510 --> 00:00:23,950
And I'm looking at it here.

8
00:00:24,230 --> 00:00:26,680
Does that just to save some time?

9
00:00:26,680 --> 00:00:29,580
Because we don't have to keep doing this tracing every time.

10
00:00:29,590 --> 00:00:36,760
So I'm just going to get rid of this tracing and also get rid of the stopped racing from here, because

11
00:00:36,760 --> 00:00:41,710
we really don't require that I'm going to save this guy and now we need to do a video capture.

12
00:00:42,010 --> 00:00:45,910
So video capture is something available in two formats.

13
00:00:45,910 --> 00:00:52,960
Basically, one is using a browser context that you can do or you can also capture video based on the

14
00:00:52,960 --> 00:00:54,490
page level context if you want to.

15
00:00:54,880 --> 00:01:00,460
So one way is to do the video capture from the browser context level, not from the page level.

16
00:01:00,700 --> 00:01:02,790
So for doing that, I'm just going to go here.

17
00:01:03,100 --> 00:01:06,190
I'm just going to do something like video.

18
00:01:07,590 --> 00:01:11,910
Part, so if you specify really part, which means it is going to be the part where you're going to

19
00:01:11,910 --> 00:01:12,970
take the video form.

20
00:01:13,140 --> 00:01:20,010
So if I just go to the video part and if I specify the directory, you could be able to get a video

21
00:01:20,280 --> 00:01:21,460
coming in over there.

22
00:01:21,480 --> 00:01:29,490
So if I just specify videos, slash something like that, this is going to capture the video for the

23
00:01:29,490 --> 00:01:30,620
recording that you're going to do.

24
00:01:30,900 --> 00:01:36,600
So for that, if I just to nod off the video captured on G.S..

25
00:01:39,290 --> 00:01:43,280
So whatever operation is currently happening, it is going to capture videos that you see that there

26
00:01:43,280 --> 00:01:46,920
is a folder called the studios and we also have a video sitting in there.

27
00:01:47,290 --> 00:01:50,060
So let me just reveal that in the finder.

28
00:01:51,140 --> 00:01:53,400
And you can see that the file format is a webcam.

29
00:01:53,450 --> 00:01:58,030
So it's a very, very small size footprint video like just two forty four KB.

30
00:01:58,310 --> 00:02:01,310
And you can see that the video is coming in, which is quite good.

31
00:02:01,760 --> 00:02:05,720
So this is something that you can use for doing a video capture.

32
00:02:06,080 --> 00:02:10,970
And also you can also use something called as recorded video.

33
00:02:11,000 --> 00:02:17,690
But Ricardi video takes the president's basically because the recorded video is the new way of working

34
00:02:17,690 --> 00:02:20,840
with the videos, because it has a lot of options along with.

35
00:02:21,140 --> 00:02:24,740
So if you go to the video part, you can see that it does a car video.

36
00:02:24,740 --> 00:02:29,600
Instead, it takes precedence over the video part, enable video recording for all the pages to the

37
00:02:29,600 --> 00:02:30,620
video about the directory.

38
00:02:30,890 --> 00:02:32,080
It is not specified in the video.

39
00:02:32,090 --> 00:02:32,930
It is not recorded.

40
00:02:33,020 --> 00:02:36,810
Make sure your browser cameras are close for the video to be saved.

41
00:02:37,040 --> 00:02:42,380
So it is not kind of recommended practice to do with the video recording video iPod.

42
00:02:42,380 --> 00:02:48,980
So just go with the videos or hear, which is going to take that video.

43
00:02:49,280 --> 00:02:53,410
And you can also specify the size of the video that you want to capture.

44
00:02:53,420 --> 00:03:02,330
So you can you can just tell something like size, as probably you can specify the width of the video's

45
00:03:02,340 --> 00:03:04,850
800 and then height.

46
00:03:04,850 --> 00:03:06,060
You can do that as well.

47
00:03:06,080 --> 00:03:11,420
And this is going to be captured based on the size that you have given the screen size that you have

48
00:03:11,420 --> 00:03:11,720
given.

49
00:03:12,050 --> 00:03:13,880
And oops, I'm sorry for that.

50
00:03:13,880 --> 00:03:20,900
I think I need to give the director of the video recorder video something like this.

51
00:03:21,320 --> 00:03:27,470
And similarly, the size should come under the record video as well, because if you use the size,

52
00:03:27,710 --> 00:03:30,580
it is applicable for the size on the video recorder itself.

53
00:03:30,590 --> 00:03:33,440
So if you just see you can get the video size over here.

54
00:03:33,450 --> 00:03:35,940
So the video part and video size goes hand in hand.

55
00:03:36,230 --> 00:03:40,580
Similarly, the size and the directory of the record video goes hand in hand as well.

56
00:03:40,610 --> 00:03:44,720
So this is the way that we can actually do for the record video.

57
00:03:45,020 --> 00:03:49,610
So you can see that this is the directory of the video which has been captured and this is the size

58
00:03:49,610 --> 00:03:51,710
that you need to capture on this particular video.

59
00:03:52,700 --> 00:03:58,310
And now, if I tried to run the video capture, hopefully this time is going to work and it says that

60
00:03:58,310 --> 00:03:58,760
I covered this.

61
00:03:58,760 --> 00:04:00,040
I started expected.

62
00:04:00,050 --> 00:04:00,530
No.

63
00:04:01,220 --> 00:04:01,730
Oops.

64
00:04:01,740 --> 00:04:02,390
Oh, my God.

65
00:04:03,590 --> 00:04:05,180
How it's spelling is wrong.

66
00:04:05,840 --> 00:04:06,770
So this is the height.

67
00:04:07,360 --> 00:04:08,270
Sorry about that.

68
00:04:08,540 --> 00:04:10,790
On screen or on the screen.

69
00:04:11,620 --> 00:04:12,090
There you go.

70
00:04:12,140 --> 00:04:14,540
It's working fine now, finally.

71
00:04:15,770 --> 00:04:20,210
And it should create a new video or record a new video on the videos folder itself.

72
00:04:20,210 --> 00:04:21,420
If not, if I'm not wrong.

73
00:04:21,440 --> 00:04:21,830
Yep.

74
00:04:21,830 --> 00:04:22,470
It's there.

75
00:04:22,970 --> 00:04:25,430
So this is the one I just double click.

76
00:04:26,780 --> 00:04:29,180
You can see that the video is now recorded on this size.

77
00:04:30,470 --> 00:04:31,190
Which is quite good.

78
00:04:31,340 --> 00:04:34,310
So you can see that everything is working fine as expected.

79
00:04:34,340 --> 00:04:40,280
So this is how you can actually capture the video of the browser on the browser context, which is quite

80
00:04:40,280 --> 00:04:46,820
good video in our next video while we talk about generating a PDF file of a page using playwrite.
