The selector is a string of characters (VB expression) used to identify objects on the screen. The selector is one of the properties of UiPath activities and has an XML format. All the activities in UiPath Studio related to graphical elements that have the selector property.
Let us create a new sequence called UiPath_Selctor_Example
Add Open Browser activity inside the sequence and then add the google URL
Next, add Type Into activity inside the Do Container of the Open Browser and indicate element on the website. Enter the Text which you wanted to search on the google search page.
When we click on the Google Search area the UiPath has selected the indicated area, this is because of Selector. Click on the Type Into Activity and in the Properties Pane, you can find Selector under Target section.
Once you click on the three dots in the selector as shown in the above image, you will find the details of the selector which is going to identify the indicated element as shown below.
There are some scenarios where the Validate button is red, then the UiPath is not able to identify the indicate element with the help of the selector.
Now let us see how the selector will work for clicking a button. Add the Click Activity inside the sequence.
Indicate the element on the website.
Open the Selector which is present under the Input section in the properties pane by clicking on the Click Activity in the sequence. If you open the Selector you can see the selector details about the button.
In the case of advanced automation, you have to manipulate these selectors, Go to the google search page and right-click on the google search button and inspect the google search button, you will find the button name as btnk.
In the case of Selenium, you need to enter this Id or Name should be entered in coding, whereas in UiPath, automatically consider this Id and identifies the path.
A UiPath Explorer is an advanced tool that enables you to create a custom selector for a specific UI element. UI explorer is available only if the UiPath.UIAutomation.Activities package is installed as a dependency to the project.
You can see UiPath Explorer in the Design Tab
And if you open the Tools on the Homepage you will find the UiPath Explorer.
The UiPath Explorer gives an opportunity to explore and inspect, how it interfaces and how it identifies the applications and how it identifies the web pages.