• Register
157 points


To automate specific actions in the user interface, you are required to interact with various windows, buttons, drop-down lists and many others. One of the ways in which UI elements can be identified is by using their position on the screen, but this can be unreliable.

To overcome this problem, UiPath Studio uses what we call selectors. These store the attributes of a graphical user interface element and its parents, in the shape of an XML fragment.

Most of the times, selectors are automatically generated by Studio and do not require further input from you, especially if the apps you are trying to automate have a static user interface.

However, some software programs have changing layouts and attribute nodes with volatile values, such as some web-apps. UiPath Studio cannot predict these changes and, therefore, you might have to manually generate some selectors.

Selectors with Wildcards

Wildcards are used in UiPath to replace zero or more characters in a string. The following are the supported wildcard characters for selectors in UiPath studio:

  • Asterisk (*) – to replace zero or multiple characters of a string

  • Question mark (?) – to replace one character of a string

Example of Generating a Selector with Wildcards in the Selector Editor Window

Part of the name of a Notepad window changes according to the .txt file you open with it. This is where a well-placed wildcard can really help. Do the following to generate it:

  1. Open an empty Notepad window. Note that the window title is Untitled – Notepad.
  2. In Studio, create a new sequence.
  3. Drag a Type Into activity to the Designer panel.
  4. Click Indicate on Screen and indicate the editable text field in Notepad. A selector is automatically generated and stored in the Selector field.
  5. In the Properties panel, click the Ellipsis image alt text button next to the Selector field. The Selector Editor window is displayed.                                                                                                                              
  6. Open any .txt file with Notepad. Note that the window title is partially different than the one at step 1.
  7. In Studio, in the Selector Editor window, click Repair and indicate the editable text field in Notepad window opened at step 6. A dialog box indicating that the selector was updated is displayed.
  8. Click OK. The Selector Editor window and the selector are updated with a wildcard.                                  

1 Comment

Please expand on this subject. Your ability to explain things is wonderful.