1
00:00:01,550 --> 00:00:07,250
All right, so in this video, we're going to see how we can extend the context options to set the device

2
00:00:07,250 --> 00:00:09,470
resolutions and stuff is very, very simple.

3
00:00:09,470 --> 00:00:14,750
As I told you, this is going to be available for you, even pretty much like how you did with the browser

4
00:00:14,750 --> 00:00:15,270
options.

5
00:00:15,560 --> 00:00:20,990
So here, if I go to the fixtures and if I could dot, you can see that I get all the different options

6
00:00:20,990 --> 00:00:28,340
like browser browse and options, browser type context, context, factory context, options is Chrome

7
00:00:28,340 --> 00:00:29,660
is Linux is Macs.

8
00:00:29,660 --> 00:00:35,150
And so basically you can see that if your test is running on a Mac operating system, then you can specify,

9
00:00:35,150 --> 00:00:39,760
you can set or override how the test should behave for the Mac operating system.

10
00:00:39,970 --> 00:00:45,620
Similarly, if it is a Linux operating system, you can set some flag to see how your test should behave

11
00:00:45,650 --> 00:00:47,300
while it is and Linux operating system.

12
00:00:47,580 --> 00:00:49,550
Similarly, you can override the page.

13
00:00:49,550 --> 00:00:54,320
You can also override the playwright and also get the test info for the reporting's and stuff.

14
00:00:54,350 --> 00:00:57,290
There are so many different cool things which is available on the fixture.

15
00:00:57,500 --> 00:00:59,270
And one thing which I really like.

16
00:00:59,270 --> 00:01:06,950
The fact is this particular Foleo test run or using ability to customize it pretty much like everything

17
00:01:06,950 --> 00:01:07,890
on the test runners.

18
00:01:08,210 --> 00:01:09,040
This is pretty cool.

19
00:01:09,290 --> 00:01:15,200
And now, as that said, this time we are going to be basically extending this context to options where

20
00:01:15,200 --> 00:01:21,930
we are going to override the screen resolution and we'll see how it actually works for doing that.

21
00:01:21,950 --> 00:01:25,190
I'm just going to do pretty much exactly like how we did before.

22
00:01:25,460 --> 00:01:28,520
I'm just going to give this context options.

23
00:01:28,520 --> 00:01:36,770
Just I'm going to create a variable type here and then I'm just going to call this as run and I'm just

24
00:01:36,770 --> 00:01:39,410
going to leave them as it is pretty much like we did before.

25
00:01:39,650 --> 00:01:47,690
So for the run, what I'm going to do is I'm just going to call the vet and I'm just going to do this

26
00:01:48,800 --> 00:01:49,610
for the wait.

27
00:01:49,610 --> 00:01:55,760
I'm just going to use the split syntax to set the context options like everything which is available

28
00:01:55,760 --> 00:01:56,870
on the context options.

29
00:01:57,920 --> 00:02:02,710
Along with that, we also need to set the Devizes.

30
00:02:02,720 --> 00:02:10,880
So here with this syntax, I can set that Devizes as iPhone or BlackBerry, like whatever devices that

31
00:02:10,880 --> 00:02:12,970
you want to set, you can set that Aspell.

32
00:02:12,980 --> 00:02:17,280
So if I just search for iPhone LeBon Permax is that they have to.

33
00:02:17,480 --> 00:02:18,890
Not yet anyways.

34
00:02:19,100 --> 00:02:25,970
So I can set the iPhone 11 Permax over here and you can see that it works fine without any problem.

35
00:02:26,150 --> 00:02:32,350
So you can set many different things, not just this one, but you can keep extending this particular

36
00:02:32,360 --> 00:02:35,540
run options with many different options that we saw before.

37
00:02:36,310 --> 00:02:44,510
So the context option also has got many different browser context options like except download bypass

38
00:02:44,780 --> 00:02:55,940
CSP View Pottz User Agent is mobile and on your locality's offline color scheme proxy's video iPod and

39
00:02:55,940 --> 00:02:56,300
stuff.

40
00:02:56,540 --> 00:03:00,430
So those things you can override over here as well.

41
00:03:00,440 --> 00:03:02,030
And again, it's very, very simple.

42
00:03:02,030 --> 00:03:05,600
As I told you, you have the power of extending it.

43
00:03:05,750 --> 00:03:08,850
Now you can keep doing that without any problem.

44
00:03:09,290 --> 00:03:14,060
So now you can see that our test is already running and had had last month I had full mode.

45
00:03:14,360 --> 00:03:15,320
The headless is off.

46
00:03:15,590 --> 00:03:20,630
And now if I tried to run this test, what going to basically happen is it's going to respond three

47
00:03:20,630 --> 00:03:25,250
different browser, but this time with the iPhone 12 resolution.

48
00:03:26,030 --> 00:03:28,890
But somehow we have this Chrome dev tools available.

49
00:03:28,890 --> 00:03:32,990
And I think that's the reason it's going to not work as expected.

50
00:03:33,470 --> 00:03:38,980
And you can see that this looks terribly bad in the iPhone 12 resolution, though.

51
00:03:39,350 --> 00:03:40,960
But, yeah, this is working fine.

52
00:03:40,970 --> 00:03:41,660
But any problem?

53
00:03:41,960 --> 00:03:45,560
So you can see that two, this has got past what it got failed.

54
00:03:45,560 --> 00:03:51,400
The one is failed because I guess Firefox doesn't really support the the browser.

55
00:03:52,130 --> 00:03:57,230
Yeah, you can see that the E mobile is not supported in the Firefox, so it's not supported yet.

56
00:03:57,230 --> 00:03:58,460
And that's the reason it is fake.

57
00:03:58,850 --> 00:03:59,510
But yeah.

58
00:03:59,510 --> 00:04:06,350
So you got the idea already, like how you can actually set the different options like contest options

59
00:04:06,350 --> 00:04:11,780
and how you can extend the test to run on different settings using the disk fixture.

60
00:04:12,620 --> 00:04:18,380
So that's the guy and this is what is the Foleo and this is what is the test run or of the playwright.

61
00:04:18,500 --> 00:04:20,960
And we can keep extending it as much as possible.

62
00:04:21,140 --> 00:04:21,380
No.

63
00:04:21,380 --> 00:04:26,960
Next video, we'll discuss how we can make this inline code to be available in an external file and

64
00:04:26,960 --> 00:04:27,800
how we can use it.

65
00:04:27,800 --> 00:04:29,090
And it is super simple.

66
00:04:29,100 --> 00:04:34,220
Even you can do it because we have already did that in an earlier video while we were talking about

67
00:04:34,220 --> 00:04:35,300
the Foley example.

68
00:04:35,360 --> 00:04:38,150
But just in case I get the questions from students.

69
00:04:38,420 --> 00:04:40,970
So I just wanted to make things more clearer.

70
00:04:41,120 --> 00:04:42,770
So I really get more questions.

71
00:04:42,770 --> 00:04:45,950
And you are clear as well, maybe even our next video.
