All right, so now that we have written all of our fixtures in line code and be able to see that it
is working fine without any problem, and I was telling you before we can write this particular in line
code or the inline fixture into another de'ath file, which is going to make your code more simpler,
look more simpler, because you can reuse this particular fixture across many different testifiers,
because you can see that currently this particular fixture is just fixed for this particular test.
But let's say if you want to run your test or maybe you want to use this regular fixture for multiple
different test, which is what he will basically be doing for most of the scenarios, you need to probably
use this particular fixture in a separate file so that you can use them for different testify.
So what I'm going to do is I'm just going to do a cut off this particular code and I'm just going to
go all the way over here.
I want to create a file and might call this as maybe a fixture like we did in our earlier video.
And I'm just going to put it over here and paste this whole code like this.
But the only change that we have to do is on the receiver decided to decide where it tells that it cannot
be resolved.
Do you want to install any dependencies for test or something like that?
Then probably you need to do the import, like how we used to in our earlier videos when we're trying
to do the fixture in the folio example.
So I'm just going to do this fixture import from our colon dot slash and you can see that the fixture
comes in.
So I can just like this picture fixture and then we need to get the constant that it if not the code
isn't going to work as expected.
So I'm going to do that.
And I guess we have really sent this to it.
But I think for some reason it's not working now because we have not really did that, that expert correctly.
So I'm just going to because this is not in line code.
So I think that's why we have to make this particular change as well.
So I just need to make a simple change in here so that the court can be even more better.
So I just made this play recognized as Foleo and then pretty much like how we used to do while we tried
doing this particular fixture code like this.
That's exactly what I'm going to do to keep things more simpler.
So I'm just going to do this.
So it adds Foleo dot it like that.
And now if you go to the inland code, you can see that the code is actually looking fine without any
problem and it's going to work as expected.
So this is the only change that we need to make on the on the external file code change.
And I guess there's is going to be a problem if I just scroll there.
We have already used this Bechler variable, so maybe I'm just going to make this like folios or something
like that so that the whole code will be happy and now it looks looking pretty good without any problem.
So now in order to execute this code once again, all we have to do is we just need to go to the test
runner and then we do NBCs Foleo of the inline fixture spec like that.
And if we try to execute this particular code here.
Oops, I think I have to say it and again, see that it is working fine, but any problems?
Just just that I have to say of the particular value that I couldn't even to save it.
And now you can see that the court is working fine and the browsers are spawning pretty much like how
it was working before.
So this is how we can actually use the external files of the fixer and we can reuse the speaker fixture
across multiple tests and we can see how it actually works.
So that's it, guy.
This is how we can actually work with the external file fixtures in the playwright or using Foleo.
Now, next video, we'll discuss how we can make use of the perimeters in the fixtures and how we can
write our own custom parameters to be passed from the command line using the folio of our particular
test.
And then we can even use it for different configuration to be used while running the test and make our
test to be more available across the board.
Meeting our next video.