1
00:00:00,180 --> 00:00:05,760
So as you remember in our earlier videos, what we are trying to do, a simple playwrite Kly operation,

2
00:00:05,760 --> 00:00:12,420
the playwright Seelie actually taught us a lot of Selecter strategy automatically already.

3
00:00:12,570 --> 00:00:17,460
As you can see what I tried to perform from a click operation, it is trying to identify a control.

4
00:00:17,460 --> 00:00:21,360
Using the cassette recorder like input name is equal to search.

5
00:00:21,690 --> 00:00:24,510
Similarly will perform a full operation.

6
00:00:25,080 --> 00:00:30,510
It is going to perform the same element and then it is trying to perform a full Senate thing.

7
00:00:30,510 --> 00:00:36,810
But it's going to enter some value like Apple and one on their particular input control and similarly

8
00:00:36,810 --> 00:00:39,620
where they perform a operation like clicking the text.

9
00:00:39,630 --> 00:00:42,510
It is also doing a clicking of the text, something like this.

10
00:00:42,520 --> 00:00:48,450
So these are some of the things which already playwrite zeolite taught us while it's trying to do a

11
00:00:48,450 --> 00:00:49,890
record operation for us.

12
00:00:50,250 --> 00:00:57,960
And the better way to learn these locate our strategy is to directly work on a application which is

13
00:00:57,960 --> 00:01:02,160
like to super simple, to identify something like that and then start working with it, which gives

14
00:01:02,160 --> 00:01:05,110
you even more comfort when you start working with it.

15
00:01:05,370 --> 00:01:11,790
So, for example, if I am probably going to go to one of the application like that, I always use while

16
00:01:11,790 --> 00:01:16,730
automating an application is going to be the app Dorsami dot com.

17
00:01:16,740 --> 00:01:20,790
So yeah, I've done so many com this website.

18
00:01:20,790 --> 00:01:25,020
So this is a very, very super simple spinet application.

19
00:01:25,320 --> 00:01:31,980
And you can see that if I just hoer to control it ornamentals that it can be identified using a text

20
00:01:32,190 --> 00:01:33,410
is equal to login.

21
00:01:33,660 --> 00:01:35,280
So this is very, very easy.

22
00:01:35,280 --> 00:01:40,920
I mean, this tool which generated by the playwright Seelie is very, very handy that it's going to

23
00:01:40,920 --> 00:01:46,230
tell you like what it is going to record, what even it's going to perform an operation there.

24
00:01:46,500 --> 00:01:48,510
So we are going to perform a click operation.

25
00:01:48,510 --> 00:01:52,350
So once I do a click, you can see that it is going to automatically record us.

26
00:01:52,350 --> 00:01:58,320
Page click text is equal to log in over here and that's what it did, actually perform a click operation.

27
00:01:58,620 --> 00:02:03,780
And then what I hold to the username, it is going to automatically tells me that is going to be an

28
00:02:03,780 --> 00:02:09,510
input name is equal to username and this guy is basically an input name is equal to password.

29
00:02:09,870 --> 00:02:16,010
So before you and I go further, I can try to identify the same control using another browser's probably.

30
00:02:16,110 --> 00:02:23,850
So if I just open my Chrome browser here and if I just navigate the app dot Saami dot com, maybe the

31
00:02:23,850 --> 00:02:31,200
login page and if I just click go to the inspect element over here and if I go to the console, probably

32
00:02:31,200 --> 00:02:36,420
you can see that the name is called the user name, which we already know, and it is an input control.

33
00:02:36,630 --> 00:02:45,210
So if I want to select with the selector, if I just put a dollar and if I just put input of name is

34
00:02:45,210 --> 00:02:51,000
equal to the user name, you can see that this particular username control is being selected for us,

35
00:02:51,120 --> 00:02:51,850
which is pretty cool.

36
00:02:51,870 --> 00:02:56,690
So this is exactly what the playwright is going to tell us as well.

37
00:02:56,700 --> 00:03:03,510
So it's actually teaching us like how or which control that we need to use for performing the operation.

38
00:03:03,720 --> 00:03:08,880
So these are some of the coolest thing which these tools are coming up with right now, like helping

39
00:03:08,880 --> 00:03:16,260
us to also learn the selector ID and these things also enhances as the way that we can use the perfect

40
00:03:16,770 --> 00:03:19,550
control way of identifying a particular control.

41
00:03:19,890 --> 00:03:22,110
So you can see that I'm just going to do that.

42
00:03:22,380 --> 00:03:24,530
And if I want to perform, I click operations.

43
00:03:24,530 --> 00:03:27,600
So it's going to tell me that there is an input pipe is equal to submit.

44
00:03:27,600 --> 00:03:32,370
Basically, there is no other unique identifier to identify the speaker control.

45
00:03:32,370 --> 00:03:36,090
And that's why it is telling me that I would submit itself is more than enough.

46
00:03:36,450 --> 00:03:38,550
So I'm going to perform a click operation.

47
00:03:38,790 --> 00:03:40,650
It's going to do that an employee list.

48
00:03:40,980 --> 00:03:46,040
We know that it's going to be taking the text because this is the only unique way of identifying.

49
00:03:46,050 --> 00:03:50,880
So I'm just going to select that and it's going to perform the rest of the operation.

50
00:03:50,920 --> 00:03:54,660
You can see that if I'm going to go to the benefit, it is not just selecting the text as a benefit.

51
00:03:54,900 --> 00:04:03,600
Rather, it is also taking the table role as three table data as six, and then it is going to normalise

52
00:04:03,600 --> 00:04:04,650
the space for benefit.

53
00:04:04,650 --> 00:04:10,590
So it knows that this is a table GUI and benefits are that are like duplicated of benefits, like duplicate

54
00:04:10,830 --> 00:04:12,650
benefit text available everywhere.

55
00:04:13,080 --> 00:04:17,610
So if I just choose one benefit, then it's not going to perform a click operation because there are

56
00:04:17,880 --> 00:04:19,840
multiple same text available.

57
00:04:20,070 --> 00:04:27,240
So uniquely identify the particular control using the table, raw table data and then the hyperlink

58
00:04:27,240 --> 00:04:28,470
a off the benefit.

59
00:04:28,480 --> 00:04:29,950
So which is pretty cool.

60
00:04:29,970 --> 00:04:37,050
So this is something the tool is already helping us to teach the better way of identifying a locator.

61
00:04:37,230 --> 00:04:42,480
And similarly, if I go to that particular text box, it knows that the name of the text box is a search

62
00:04:42,660 --> 00:04:43,140
term.

63
00:04:43,410 --> 00:04:51,090
It's very easy to identify or work with locators while working with a very simple control, probably.

64
00:04:51,180 --> 00:04:58,170
But if the application is quite complex, probably if it is it has a dynamic control types, then probably,

65
00:04:58,170 --> 00:04:59,460
yes, it is going to be a bit.

66
00:04:59,610 --> 00:05:06,240
The key to identifying those areas and again, there are always a better way to work with those controls

67
00:05:06,450 --> 00:05:08,820
and playwright can easily do that.

68
00:05:08,940 --> 00:05:14,090
I mean, while we talk about different control types in our next lecture, we'll talk about that even

69
00:05:14,110 --> 00:05:16,700
more detail while working with some complex controls.

70
00:05:16,710 --> 00:05:21,960
But yes, this is something which you can see that this is very, very easy to identify and work with.

71
00:05:22,170 --> 00:05:24,900
And Playwrite is already helping us to do that.

72
00:05:25,290 --> 00:05:35,250
And if I try to perform a create new and if I, let's say, put an admin up as a name and salary and

73
00:05:35,880 --> 00:05:44,040
duration worked grade order it at auto dot com, something like that.

74
00:05:44,040 --> 00:05:50,010
And if I had to create a that is created and if I perform a delicate operation, you can see that this

75
00:05:50,010 --> 00:05:55,650
is going to perform it and it's going to be a type of button as well like that.

76
00:05:55,980 --> 00:05:56,820
And it is gone.

77
00:05:56,820 --> 00:06:00,810
And then I'm going to perform a logoff and then I can just close this guy.

78
00:06:01,530 --> 00:06:05,820
So this way you can see that everything is being recorded for us.

79
00:06:05,820 --> 00:06:06,150
Like what?

80
00:06:06,150 --> 00:06:07,290
Our operation that we are doing.

81
00:06:07,530 --> 00:06:11,340
And the recording is going to be working as well if you try to execute that.

82
00:06:11,370 --> 00:06:12,630
So this is pretty cool.

83
00:06:12,630 --> 00:06:18,690
I guess this recording and playback operation, which we are doing with a playwright, not only performs

84
00:06:18,690 --> 00:06:26,100
the recording playback, but it also teaches us like how we should be able to identify, control and

85
00:06:26,100 --> 00:06:27,450
work with that particular control.

86
00:06:27,810 --> 00:06:35,130
So if I just try to put a year, I guess I just pace this guy.

87
00:06:35,340 --> 00:06:38,310
You can see that everything is coming up for us.

88
00:06:38,370 --> 00:06:39,480
I'm just going to say this.

89
00:06:39,480 --> 00:06:48,060
And if I just do a nod in a dark place and if I hit the enter, so whatever operation that we just performed,

90
00:06:48,510 --> 00:06:52,290
it is going to exactly do the same operation for us pretty instantly.

91
00:06:52,680 --> 00:06:57,590
You can see that everything is done super quick and these locators are just working fine.

92
00:06:57,840 --> 00:07:02,880
So these things are going to be very, very helpful for us when we work with an organization where we

93
00:07:02,880 --> 00:07:08,880
need to automate a lot of test cases and test scenarios so we can just use this cli generate the code,

94
00:07:09,090 --> 00:07:10,020
copy paste the code.

95
00:07:10,020 --> 00:07:16,230
And if we think that some of the controls are not identified properly, then we can use our coding technique

96
00:07:16,470 --> 00:07:17,970
to identify the people controlling them.

97
00:07:17,980 --> 00:07:19,190
What better way?

98
00:07:19,320 --> 00:07:22,620
But yes, this is the most, easiest way that we can work with.

99
00:07:22,800 --> 00:07:27,780
And the next thing they wanted to talk about was actually the scissors extension, like the visible

100
00:07:28,050 --> 00:07:29,370
text options.

101
00:07:29,370 --> 00:07:36,810
Like I was talking about the input of the name as let's say, if I just go all the way down here, you

102
00:07:36,810 --> 00:07:40,730
can see that a clicking a submit operation for the login button.

103
00:07:40,740 --> 00:07:45,960
So instead of doing that way, I can also identify the bigger control using the text as a login.

104
00:07:46,530 --> 00:07:47,990
So you can see that this guy.

105
00:07:48,600 --> 00:07:53,670
So if I want to perform a click operation is in the login button text, then probably I can do that

106
00:07:53,670 --> 00:07:54,000
as well.

107
00:07:54,030 --> 00:08:02,370
So if I just do a, uh, input of text and if I just do, probably I'm just going to use the double

108
00:08:02,670 --> 00:08:10,170
this time and then I'm just going to go log in something like that so I could be able to identify the

109
00:08:10,170 --> 00:08:13,310
same control using input of the text.

110
00:08:13,320 --> 00:08:18,270
So this is an extension of the CSIS, which is going to be helpful for us to identify the control using

111
00:08:18,270 --> 00:08:19,530
the text as well.

112
00:08:19,530 --> 00:08:21,900
So you can see that it just worked without any problem.

113
00:08:22,200 --> 00:08:25,350
And we can also give some spaces in here.

114
00:08:25,350 --> 00:08:34,170
And this text is automatically going unresolved because the spaces or any leading or trailing spaces

115
00:08:34,180 --> 00:08:37,890
available on the text is going to be resolved by the success.

116
00:08:37,890 --> 00:08:40,460
And you can see that just working fine out any problem as well.

117
00:08:40,490 --> 00:08:47,190
So these are pretty cool if you try to probably do something like a space and a capital A and now if

118
00:08:47,190 --> 00:08:48,750
you try to run this test.

119
00:08:52,370 --> 00:08:56,690
You can see that it's still working fine, I mean, it just works fine without any problem.

120
00:08:56,920 --> 00:09:03,560
There is also another way, something like dust is so this is going to do the exact same operation.

121
00:09:03,720 --> 00:09:09,530
But over here, it is not recommended to use the text is extensibility because text itself is going

122
00:09:09,530 --> 00:09:14,480
to take care of all the spaces and the I text like that.

123
00:09:14,720 --> 00:09:20,300
But let's say if I just remove this eye completely from here and then if I try to run that this particular

124
00:09:20,300 --> 00:09:27,170
test should definitely fail because there is no such text available like log in, something like that.

125
00:09:27,170 --> 00:09:29,120
I mean, it's I'm going to do a condensed operation.

126
00:09:29,120 --> 00:09:34,880
It is going to do it contains operation a bit, but it is not like ignoring the full control with a

127
00:09:34,880 --> 00:09:35,960
different text altogether.

128
00:09:35,960 --> 00:09:38,540
So you can see that this particular test is actually going to fail.

129
00:09:38,990 --> 00:09:43,730
And you can see that the test has not given up so quickly without telling that the login button is not

130
00:09:43,730 --> 00:09:43,930
there.

131
00:09:43,940 --> 00:09:47,060
Something like that is just waiting for the timeout to happen.

132
00:09:47,240 --> 00:09:50,090
And then it is going to give you an error.

133
00:09:50,100 --> 00:09:55,820
You can see that the waiting for three thousand millisecond exceeded and then the timeout happened and

134
00:09:55,820 --> 00:09:56,790
the test card failed.

135
00:09:57,050 --> 00:10:03,080
So these are some of the cool things which playwrite automatically have like an automatic automatic

136
00:10:03,080 --> 00:10:04,010
weighting mechanism.

137
00:10:04,010 --> 00:10:08,740
So I mean, we'll talk about the automatic reading mechanisms and stuff in our later lectures of this

138
00:10:08,750 --> 00:10:09,110
course.

139
00:10:09,110 --> 00:10:13,310
But yes, this is something that you need to know when you talk about the selectors.

140
00:10:13,520 --> 00:10:18,500
And yes, these are something which is already available in playwrite by default.

141
00:10:18,860 --> 00:10:23,300
Talk about working with different controls in our next lecture.
