In this lecture, we are going to talk about sitars in our intent to start a the course selectors sardars
is the heart and soul of an AI automation testing tool.
The easier it is to identify a control, the better it will be for test automation, engineers or the
softwares to work with.
I'm saying software here is nothing but the tools which are extending these automation testing tools.
So playwrite, if it is extended by any other third party testing tool, then it will be very easy for
that particular tool to use playwright's identification mechanism for identifying a control and work
with it.
So that is very, very important.
And these are some of the most important thing right now with the ever changing technology landscape.
And because everything is changing at the moment in the automation testing world, the way the structures
needs to be identified is also needs to be more, more easier and effective while identifying a controller
itself.
And there are various ladders exist in the market.
Some of the most common structures that we always use while automating an application is the see as
a selector.
So I'm saying default here because playwrite uses the SEALs as little engine as the default engine to
select and control.
And then we have XPath selectors and then text Slatyer ID and name.
So these are the most important control that is available on the market and this is how we try to select
the control from the UI and then we work with it.
So this is something very, very important.
And if we know how to work with this Lakhtar, if we know how to identify a control using the parte
or text or ID, then it is going to be very, very easier.
And there are many different tools available on the market which are very, very useful to work with
radars and identifier controls.
You can use the chromed tool itself to identify the controls.
Nowadays they are getting very, very easy and highly sophisticated to identify a control.
I would probably walk through a few of them and we'll talk about them in this particular course as well.
And the playwright's engine by default user a engine, as I told you.
But if any selector starts with a double slash or a double dot, then the engine consider them as an
expat.
So that is very, very important.
If you if you have ever worked with a puppeteer.
And that is a different course.
When I talked about puppeteer, where I need to write some sort of customization to identify and work
with the next part, but here in playwrite, the next part is something in and it is available for you
directly and then you can start working with it.
That's a very, very straightforward way with playwrite.
So it automatically identifies if it is double's or double dot, then it knows that it is basically
an XPath.
Similarly, shallow arms are also supported by default and playwrite using the CCCC light engine.
So this is also one of the most coolest thing because most of the time few tools don't even support
the shattered arms.
I mean, nowadays most of the tool does support shattered arms, so it's not a big deal at all.
Playwrite also supports shattered arms, which is pretty cool.
And the Sears's engines with extensions is another new thing which is available with the playwright
where the engine and the fire control, apart from the normal way of identifying certain elements.
But it also put a suffix like visible text or light, something like that, to identify a controller.
So, for example, if there is a full operation, as you can see over here, but I'm trying to do username
Callon visible and then admin.
What I'm trying to say here is if I need to fill a value like admin for a text box username, then make
sure that it's also visible.
I mean, those things are going to be taken care by you automatically or automatically by playwrite
using actionability ability.
I mean, I talk about the actionability ability later in this section.
But yes, that is something like an auto with our auto action mechanism, which is available in the
playwright the engine automatically to identify a control if it is visible or not.
But you can explicitly specify in some circumstances where the control is super dynamic and you wonder
that dynamic element to be always visible before you perform an operation, something like that.
You can use this call and visible option as well.
You can specify Callon text on any of the control, let's say, if there is a log in text.
But if there is a space or something like that, like I have just given it big space over here, this
will also work similar to this particular click, as you can see over here.
So because the text, as you can see here, it'll automatically removes all the spaces from from the
text that you are trying to identify.
And then it works automatically, but is also on the colting.
Suddenly the light is something which is used for identifying a shadow dom.
And stuff.
So these are some of the cool things is available within the CSA tower engine, within playwrite and
then XPath engine.
I already talked about it.
If Assadullah starts to double slash our double dot, then it is going to identify a control using the
XPath.
And you can see the below example is one of the example of the expired threat.
One point ninety five controllers in the non-aligned space and performing direct operation assembly
text engine is another good thing, which is older than playwrite, where you can specify a visible
text wherever it is, and then you can perform a click operation or enter operation, something like
that, or type operation using the test engine.
So the text engine is like you're going to specify text is equal to create new, then it's going to
click that particular create new text.
Similarly for the login text and for the employee employer list text, you can perform an operation
using text itself, which is also another thing that you can do with the text engine.
So let's quickly see all these ID operation in much, much detail as a demo in our next video.