All right, so hopefully you would have found the solution, if not the solution is super simple.
Guys, are we going to do is we're going to make use of a bit of JavaScript concept over here?
That's the reason I really wanted to show this kind of scenario over here so that you can understand,
like what else we can do with the playwright and the power of JavaScript.
So in order to grab all the details from a table, all we're going to do is be defined or find the whole
table like how are we going to do so?
If you remember in our earlier section, we talked about how we can get that data right from a text
box or a text, something like that.
But that was a very, very basic thing that we discussed.
But this time we're going to talk about a bit more advanced concept here, like how we can get the details
from a from a table.
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
like that, which is going to hold all the whole great table itself.
So I'm going to do something like Badler and the for the first time, I'm going to show you how we can
use a dollar to evaluate this done that.
Our eval is very, very interesting because it's going to evaluate, evaluate the whole dom and you
can tell what you need to really require to search for within your table on your dom.
So in this place, I really required a table off the table roll and then I'm going to get all the rows
from this particular table.
And once I get that, I'm also going to create an array or a two dimensional array for this particular
table.
So you can see that I'm going to use an array dot from method, which is going to have all my rows.
And within that I'm going to hold all the row of the particular table itself.
So within the rows will have columns as well as you know.
So I'm just going to get all the columns that I'm going to grab all the columns off that particular
row.
So for doing that, I really require what is called as a query selector, all method not selected,
because if I've got this right now, it's considered only one column.
All is going to select all the columns, which has a tag of two to basically the column data is going
to be sitting on the TD for us and then I'm going to return the array dart from of all the columns which
we have over here.
And then I'm going to get a specific data from that particular column, which is nothing but not the
columns column, which is going to be the column.
Docked in text so you can get an extra Hesterman or whatever that you want, I can grab those details
right from there and once you have all these details, you have all the details required for your great
table results.
So this is really, really cool.
You can grab all those details right from here.
And once you have all these table information, basically this guy is now a two dimensional array of
data and it has an array of array of data, basically.
And once you have all these details, you can now use our powerful efforts to grab the details and write
on the filesystems.
So I'm just going to use the file system.
Remember, we have been using this a lot as well.
And then I'm going to go all the way down over here and then I'm just going to write consed off.
Maybe a grid data is equal to jasen dot string if I mean, I'm using this a lot as well in this call
so far.
So I'm going to grab the great table result.
I'm going to get all the details and once I have this I can then write file, think of that particular
data.
So I'm going to write something like a great, great table data dard Jasen, which is going to be coming
from that great
data.
That's it.
So once I have all these details, I could be able to write that on the table.
So on the days on file, so right on the JS on file, uh, and you could see the particular result coming
in in this particular folder.
So we'll quickly see you.
How does it really work?
So I'm just going to run this guy data driven technologies once again.
So you can actually see that everything has happened behind the scene, so if you go to the great day
where they are jasen, the data is already there for us.
Guys, you can see that everything is actually coming.
So you can see that is an array of arrays.
I can probably show you in a better view, something like a jasen format or something like that.
And if I just paste this guy, process it, you can see that the data comes in.
So this is the data, right?
Cultic four thousand twenty four one is your automation, catechetical automation, dotcom, the benefits.
Edit and delete some Prashanth Ramish, Jon Tester, the user.
So this is before the delete operation that we are doing.
Right.
So once we perform a lead operation, that particular data that it does, the user will not be there
and that it will be different.
So that's it.
So this way we could see that we could be able to grab data right from the table and we can show that
as well.
So this is another way that we can grab the details and we can export it to adjacent files and stuff.
I mean, the imagination is the only limited I mean, we can keep doing a lot of things on this particular
lab.
But again, your imagination is going to be the limit.
Once again, as I told you, can keep doing whatever that you want to do.
And playwrite is highly, highly extendable.
So this way we could complete that data driven testing and how we can able to manage that data and how
we can even export the data right from the already inserted data, like exploding a great table and
verify that if you want to.