In this CPS WebTips, we explore the basics of selectors and how they can be used to become more dynamic. With good selectors comes more reliable and change resistant workflows. We will define a selector and explore dynamic vs static selectors. Then we will investigate wildcards and the role they play inside of selectors. At this point, we switch to UiPath studio to take a more hands on look at dynamic selectors and selectors using wildcards. Lastly we investigate a mock process that highlights work item data using dynamic selectors.
- UiPath selectors are the building blocks of user interface (UI) automation. For every UI activity, you need a finely tuned selector to uniquely identify the element. Think of the selector like the “address” of an element.
- Selectors store the attributes of a graphical user interface element and its parents, in the shape of an XML fragment.
- We review static and dynamic selectors and show the ways in which both work.
- Selectors can be modified inside of the properties panel titled “Selector”. Here we can implement variables or wildcards into the selector to make the selection of the element more dynamic.
- Wildcards are symbols that enable you to replace zero or multiple characters in a string. These can be quite useful when dealing with dynamically changing attributes in a selector. This includes:
- Asterisk (*) – replaces zero or more characters
- Question mark (?) – replaces a single character
Watch the entire WebTips on modifying UiPath selectors:
Visit our entire WebTips library on our YouTube Channel.
Still have questions regarding this topic? Contact the CPS experts.
Not subscribed to CPS WebTips? Subscribe here.
Clear Process Solutions | Making the complex simple