So in this lecture, we're going to see how we can actually use the trading information for all the
trading information along with that particular screenshot, and we are actually going to see how we
can actually make even more extracted screenshot information.
So probably what I'm going to do is I'm just going to create one more file.
I'm going to see a trace of extract or something like that.
And over here I'm going to start doing those operations.
So what I'm going to do is I'm not going to stop the trading over here.
Probably I'm just going to take a bit further and I'm going to put the trading information over here
and just see this guy.
All right.
And over here, what I'm going to do is I'm going to start extracting the trace information.
So for doing that, I'm just going to put a concept of trace info, something like that, and then I'm
just going to do a jasen dot pod.
So we know that a part of the JavaScript language that Jasen is something which is already dead in Boult,
which is quite good.
So using this policy, you can actually do a lot of things.
I mean, you can directly get this data on file and start working with it, but not read the file.
We actually require another library called as EFS or it's a file system library.
So you require that.
So I'm just going to do a required of Eephus.
This is quite good and I think it's like the system that I will in Java and Darknet.
That's exactly what it is.
So I'm just going to use this guy to read the file.
So if I start to read File Sync and I'm going to read the file based on the file that I have, which
is nothing but the restart JS on file over here, and I'm going to read that in the probably the UTF
format.
So UTF eight like that.
And then I'm going to start doing that trace operation.
So I'm just going to say something like consed of trace data is equal to trace info dot.
So what I'm going to do is I'm going to do a trace events.
So there is something called a stress event where you can actually do something like a filter of X such
that I'm going to do something like this where I'm going to say X dot cat, which is nothing but the
categories is equal to disabled by default screenshots, something like that.
So I'm just going to put that guy over here and then I'm going to put some additional information like
what name is called the screenshots and type of X not arcs as undefined and snapshot as undefined.
I mean, you can get all this information from your developers if you are not pretty much aware, like,
how are you going to do that?
Because they actually write or put a lot of information for the performance tracing so you can use those
option to be available for you over here.
So I'm just going to put all those informations here and then we can actually extract that particular
information and then we can create a screenshot and we can see how it actually works.
So far doing that once again, I'm just going to do a trace data, dot, because this is going to be
like a, uh, array of information.
I'm going to use a foreach loop here and I'm going to write a function like SNAP, come on indexed.
And within this particular function, I'm just going to do and I first start right.
File of.
I'm just going to say screen screenshot, because it's going to be the screenshot of all the trace information
that we are doing and I'm going to use the here symbol for doing the string manipulation.
I'm just going to say index dot PMG, come on, snap, dot, args, dot snapshot.
Come on basis for a function of the errors.
I probably need one more function here, which is going to take care of that.
And if there is going to be any function error that you can destroy the console, the log of Right.
Error, something like that.
And I guess this is all right to put a close process because it's an iffy condition and that's it.
I guess that's all good.
So this way it's going to take a screenshot.
It's going to pass those information and it's going to print those information.
I mean, take those screenshots and it's going to show us over here, which is also pretty cool.
So now let's try to see if this really actually works.
So I'm just going to do a node of extract and I'm just going to run that guy right now.
So I was going to respond the browser once again.
And you can see that it has completed and now we are expecting some screenshots to come in here.
And you can see that all the screenshots comes in.
So you can see that all these screenshot is basically the screenshot that you actually saw on the timeline,
all of that.
So this is pretty cool, right?
I mean, you have captured all the screenshot of that particular operation that you are performing,
and it is also capturing just the screenshots.
So you are basically extracting the information that you want and you are also showing that information
over here, which is also pretty cool.
So this is how you can actually keep extracting the events that you really required based on the category
like how we did not edit video with this particular category and then you can get that, which is quite
good.
So these are the things that you can actually do over here on Playwright's trace operation using the
very, very super simple stock tracing method and stop tracing method, along with a few more informations.
You can actually do a lot of operations on your playwrite while doing modern testing that you really
are required to do.
So we do in our next lecture while we talk about video capture with playwrite.
Thank you.