How does UiPath get the XML file of the program?

Hi, I am taking the “selectors” course, part of RPA developer foundation.
I learned that “selector” is

a feature that enables the identification of a specific User Interface element through its address and attributes. These are stored as XML fragments.

My question is, How does UiPath get the XML file of the program? for example when we use click activity in the “calculator” App, How does Uipath selector know about the XML file of the “calculator” App to build the selector?
Another question, What does “validate” option do in the UI explorer? Is the selector just the XML path to a specific UI element?

This is all built into Windows. UiPath is basically reading information from Windows about apps, windows, UI elements, etc.

Validate lets you check if the selector still finds the UI element. Say you have a web page with a list of links and you need to get some text from each page/link. You click the first link and get a selector for the text you want. You go back, then click the second link…now you can click Validate to make sure the selector still finds what you want on the page. If it doesn’t then you have to adjust the selector. (Things like page title often are different page to page, for example, so you could take title=‘xxxxxx’ out of the selector then click Validate again to see if it works now).

1 Like

Oh, and it’s not that UiPath is getting the info about the app etc AS XML. It gets it in whatever format Windows provides it, and then UiPath stores it as XML (the selector IS the XML).

1 Like

Yes exactly. And you’ll often have to edit the selectors to make them work for you. The training will get to that :slight_smile:

1 Like

But How does UiPath convert .exe files to XML(tags and attributes)?

They aren’t .exe files. They’re applications running. Everything is an object, a UI element. Every open window, every button, every menu, every menu item, every web page title, link, button, every every little thing is an object to Windows.

UiPath is just getting the properties of those objects from Windows. Windows also provides ways to interact with the ui elements either by controlling mouse/kb or “under the hood.”

A selector is a path to an object, stated in XML format.

1 Like

Open Ui Explorer and click Indicate Element.

Move the mouse around the screen. You’ll see it picking up all these objects, the UI elements - windows themselves and objects inside the windows. You can press F2 and it will give you a few moments to click around without activating UI Explorer, so you can change apps/windows and look at all their objects.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.