All right, so in this lecture, we're going to see some more playwrite with Java binding and see how
easy it is to work with the Java binding of playwrite.
So as you can see or hear on this particular playwrite, we are always trying to do a create operation.
And after the playwright is available over here, we are then doing a browser launch and things of that
nature like Firefox.
And if I had DOT, you can see the different browsers coming in like Firefox, Chromium and Web kit.
And you can also see there is something called Devizes selectors and stuff, which is really, really
cool.
I mean, you get all the different options that we always get on the typescript and JavaScript.
That's exactly what comes in over here as well.
So this is quite good at the moment, which I really like the fact that they try to keep the whole language
binding, pretty similar for each and every language bindings like JavaScript, C, sharp and Java.
I have not explored the python go so far.
I think they are going to be same Aspell.
And you can also see that if I want to start the launch with the headless more than I can just set the
headless over here.
But if I really wanted to set different options I could be able to do that as well.
So if we just type something called launch options, you can see this is a class so I can just use launch
option as launch options and then new launch options and then I can just use the launch options or DOT.
You can see that it returns you all the different functions that you can actually set something like
Dev Tools, Headless with arcs that we just used over here.
And then there is an environment, chromium, sandbox, dev, tool pad, executable pad, Firefox,
user preference and all the different things that we could actually do on that particular launch options.
So if I want to use a delta, then I can just use some tools as true, probably.
And then I can also set the launch options of headless
headless as false.
And if I want to set any other launch options, then I can keep setting all the launch options here,
like download a podcast executable path that we already used.
And once we have everything over here on the launch options, I can directly pause the launch options
over here, something like this, so you can see that the coding practices are very, very refined and
straightforward.
Similarly, for the new context, you could actually see that if I just do a controlled space, you
can see there is something called as launch options.
And if I just go, probably just go to a new context.
You can see they have something called as browser, the new context options.
So this new context options is something you can use to set different options as well.
So if I go to this particular new context options, you can see they have except downloads.
Ignore WB s errors, bypass kesby viewport device scale factors is mobile, has a time zone, ID, geolocation,
local permissions, extra seedbox headers and stuff.
So these are exactly the same properties that we already set in our typescript and JavaScript language
bindings.
Guys, no change on that, which is quite good.
So I can just do one more option, something like new context options.
I guess this is the one that you're talking about.
Yeah, and then, uh, new context options is called the new new context options and this contest options.
I can keep extending ESPN's new contact option DOT.
I can set the device scale factor or probably geo locations is equal to of geo locations where I need
to set with accuracy, latitude and longitude and latitude doubles and stuff.
I mean, we can keep extending this as much as we can and we can also try to set probably like devices.
So I think there is something called us with devices where I can actually set the playwright dot.
There is something called Devizes where you can set the device, uh, something like I think there is
something called the iPhone, uh, iPhone Leverne Pro Max, uh, if I'm not wrong.
And should use of courts here.
Yeah, so this device is what is going to be set while it opens the browser for us, I mean, we can
keep doing this as much as we can and you can see that we can use these contacts and stuff within our
context over here and then we can try using it.
So this is really, really cool to see that our coatings are much, much refined in this particular
language, binding, and we can keep using it.
I mean, working with the Java language binding is going to be much, much easier if you have a complete
understanding of playwrite in the JavaScript language binding, because that's exactly what has been
propagated to the typescript Asmodeus for the Java and little bit change on the C sharp language binding.
I mean, they are going to be exactly the same idea in all the language binding.
Pretty much exactly the same one.
So if I tried to execute this code, this code might execute or might not, because I'm not sure about
the key of the iPhone 11, Max, but I'm just trying to execute it and see how it actually works.
So you can see that there is an exception to the device.
As I told you, I'm not sure about the device.
I'm just going to remove that particular stuff alone.
And if I tried to execute this so that they would do is true and the headless false right now.
So I should see a browser with those two options.
I probably have to come in this whole code because that's what it is complaining.
And if I try to get it.
You can see that the delta is on right now, and that is Hetland Hurdlers is also off and the test is
actually executing.
But there are some failures happening because I should have closed this correctly.
I'm not doing it at the moment.
And that's why the navigation has failed because of the crash.
I mean, if you don't really like the cold weather, there are going to be some crashes here and there.
But but, yes, we will talk about how we can resolve these kind of issues in upcoming sections.
But, yes, this is how we could actually use the Java language binding of playwrite.