1
00:00:00,300 --> 00:00:04,980
All right, so hopefully you would have found the solution, if not the solution is super simple.

2
00:00:04,980 --> 00:00:09,510
Guys, are we going to do is we're going to make use of a bit of JavaScript concept over here?

3
00:00:09,780 --> 00:00:14,490
That's the reason I really wanted to show this kind of scenario over here so that you can understand,

4
00:00:14,490 --> 00:00:18,940
like what else we can do with the playwright and the power of JavaScript.

5
00:00:19,320 --> 00:00:27,060
So in order to grab all the details from a table, all we're going to do is be defined or find the whole

6
00:00:27,060 --> 00:00:28,320
table like how are we going to do so?

7
00:00:28,320 --> 00:00:34,230
If you remember in our earlier section, we talked about how we can get that data right from a text

8
00:00:34,230 --> 00:00:36,420
box or a text, something like that.

9
00:00:36,540 --> 00:00:38,580
But that was a very, very basic thing that we discussed.

10
00:00:38,700 --> 00:00:44,730
But this time we're going to talk about a bit more advanced concept here, like how we can get the details

11
00:00:44,730 --> 00:00:47,350
from a from a table.

12
00:00:47,670 --> 00:00:55,470
So for doing that, I'm just going to do a const and I'm just going to add to the table result or something

13
00:00:55,470 --> 00:00:59,570
like that, which is going to hold all the whole great table itself.

14
00:00:59,580 --> 00:01:04,770
So I'm going to do something like Badler and the for the first time, I'm going to show you how we can

15
00:01:04,770 --> 00:01:07,850
use a dollar to evaluate this done that.

16
00:01:07,860 --> 00:01:14,580
Our eval is very, very interesting because it's going to evaluate, evaluate the whole dom and you

17
00:01:14,580 --> 00:01:21,930
can tell what you need to really require to search for within your table on your dom.

18
00:01:21,960 --> 00:01:28,200
So in this place, I really required a table off the table roll and then I'm going to get all the rows

19
00:01:28,200 --> 00:01:29,840
from this particular table.

20
00:01:30,450 --> 00:01:37,860
And once I get that, I'm also going to create an array or a two dimensional array for this particular

21
00:01:37,860 --> 00:01:38,220
table.

22
00:01:38,280 --> 00:01:45,810
So you can see that I'm going to use an array dot from method, which is going to have all my rows.

23
00:01:45,810 --> 00:01:51,440
And within that I'm going to hold all the row of the particular table itself.

24
00:01:51,840 --> 00:01:55,610
So within the rows will have columns as well as you know.

25
00:01:55,830 --> 00:02:02,130
So I'm just going to get all the columns that I'm going to grab all the columns off that particular

26
00:02:02,130 --> 00:02:02,450
row.

27
00:02:02,640 --> 00:02:09,930
So for doing that, I really require what is called as a query selector, all method not selected,

28
00:02:09,930 --> 00:02:12,840
because if I've got this right now, it's considered only one column.

29
00:02:14,010 --> 00:02:20,820
All is going to select all the columns, which has a tag of two to basically the column data is going

30
00:02:20,820 --> 00:02:30,270
to be sitting on the TD for us and then I'm going to return the array dart from of all the columns which

31
00:02:30,270 --> 00:02:32,040
we have over here.

32
00:02:32,430 --> 00:02:38,870
And then I'm going to get a specific data from that particular column, which is nothing but not the

33
00:02:38,880 --> 00:02:43,110
columns column, which is going to be the column.

34
00:02:44,780 --> 00:02:51,680
Docked in text so you can get an extra Hesterman or whatever that you want, I can grab those details

35
00:02:51,680 --> 00:02:57,880
right from there and once you have all these details, you have all the details required for your great

36
00:02:57,980 --> 00:02:58,870
table results.

37
00:02:59,150 --> 00:03:00,740
So this is really, really cool.

38
00:03:00,740 --> 00:03:03,050
You can grab all those details right from here.

39
00:03:03,560 --> 00:03:09,980
And once you have all these table information, basically this guy is now a two dimensional array of

40
00:03:10,220 --> 00:03:13,010
data and it has an array of array of data, basically.

41
00:03:13,520 --> 00:03:22,490
And once you have all these details, you can now use our powerful efforts to grab the details and write

42
00:03:22,490 --> 00:03:24,040
on the filesystems.

43
00:03:24,040 --> 00:03:26,150
So I'm just going to use the file system.

44
00:03:26,240 --> 00:03:28,370
Remember, we have been using this a lot as well.

45
00:03:29,480 --> 00:03:35,870
And then I'm going to go all the way down over here and then I'm just going to write consed off.

46
00:03:37,280 --> 00:03:49,520
Maybe a grid data is equal to jasen dot string if I mean, I'm using this a lot as well in this call

47
00:03:49,520 --> 00:03:50,000
so far.

48
00:03:50,450 --> 00:03:53,480
So I'm going to grab the great table result.

49
00:03:53,870 --> 00:04:02,000
I'm going to get all the details and once I have this I can then write file, think of that particular

50
00:04:02,540 --> 00:04:02,940
data.

51
00:04:02,960 --> 00:04:12,800
So I'm going to write something like a great, great table data dard Jasen, which is going to be coming

52
00:04:12,800 --> 00:04:13,970
from that great

53
00:04:16,640 --> 00:04:17,050
data.

54
00:04:17,510 --> 00:04:17,960
That's it.

55
00:04:18,530 --> 00:04:21,840
So once I have all these details, I could be able to write that on the table.

56
00:04:21,860 --> 00:04:32,480
So on the days on file, so right on the JS on file, uh, and you could see the particular result coming

57
00:04:32,480 --> 00:04:34,010
in in this particular folder.

58
00:04:34,070 --> 00:04:34,960
So we'll quickly see you.

59
00:04:35,030 --> 00:04:35,930
How does it really work?

60
00:04:35,930 --> 00:04:38,990
So I'm just going to run this guy data driven technologies once again.

61
00:04:44,580 --> 00:04:49,290
So you can actually see that everything has happened behind the scene, so if you go to the great day

62
00:04:49,330 --> 00:04:52,890
where they are jasen, the data is already there for us.

63
00:04:52,890 --> 00:04:55,590
Guys, you can see that everything is actually coming.

64
00:04:55,590 --> 00:04:57,270
So you can see that is an array of arrays.

65
00:04:57,570 --> 00:05:04,110
I can probably show you in a better view, something like a jasen format or something like that.

66
00:05:04,800 --> 00:05:09,870
And if I just paste this guy, process it, you can see that the data comes in.

67
00:05:10,200 --> 00:05:11,280
So this is the data, right?

68
00:05:11,280 --> 00:05:17,580
Cultic four thousand twenty four one is your automation, catechetical automation, dotcom, the benefits.

69
00:05:17,580 --> 00:05:22,810
Edit and delete some Prashanth Ramish, Jon Tester, the user.

70
00:05:22,830 --> 00:05:25,680
So this is before the delete operation that we are doing.

71
00:05:25,680 --> 00:05:25,950
Right.

72
00:05:26,640 --> 00:05:34,110
So once we perform a lead operation, that particular data that it does, the user will not be there

73
00:05:34,110 --> 00:05:35,290
and that it will be different.

74
00:05:35,730 --> 00:05:36,330
So that's it.

75
00:05:36,390 --> 00:05:43,410
So this way we could see that we could be able to grab data right from the table and we can show that

76
00:05:43,410 --> 00:05:43,740
as well.

77
00:05:43,770 --> 00:05:49,180
So this is another way that we can grab the details and we can export it to adjacent files and stuff.

78
00:05:49,200 --> 00:05:54,510
I mean, the imagination is the only limited I mean, we can keep doing a lot of things on this particular

79
00:05:54,780 --> 00:05:55,440
lab.

80
00:05:55,720 --> 00:05:57,810
But again, your imagination is going to be the limit.

81
00:05:57,810 --> 00:06:00,900
Once again, as I told you, can keep doing whatever that you want to do.

82
00:06:01,290 --> 00:06:03,600
And playwrite is highly, highly extendable.

83
00:06:03,750 --> 00:06:09,660
So this way we could complete that data driven testing and how we can able to manage that data and how

84
00:06:09,660 --> 00:06:15,420
we can even export the data right from the already inserted data, like exploding a great table and

85
00:06:15,420 --> 00:06:16,800
verify that if you want to.
