This is UltimateRPA Documentation
Inspector

Running Inspector

You can launch the Inspector by launching the Inspector.exe application in the UltimateRPA Tools directory.

TutorialInspectorInspectorFile.png
Figure 1 The Inspector application

Practical example of the use of Inspector

The following example describes how to create a Python expression for writing a username in the login form in the RpaLoginTest tutorial application. This application can be found in the TutorialApps subdirectory of the UltimateRPA Tools directory.

TutorialInspectorTutorialApp.png
Figure 2 The RpaLoginTest application

Open Inspector and RpaLoginTest. In the upper left corner of Inspector, drag the crosshair to the RpaLoginTest window area by clicking and holding the left mouse button.

TutorialInspectorAimerCross.png
Figure 3 Crosshair in the Inspector application

Based on cursor movement, an object is highlighted in the application with a green frame to indicate where the crosshair is pointing.

TutorialInspector_inspector_aiming.gif
Figure 4 Aiming at a GUI element

Above the field, next to the Username text, release the left mouse button and load the properties of the targeted object into Inspector.

TutorialInspectorElementLoaded.png
Figure 5 Loaded GUI element properties

Now you need to define the properties that are used to identify the GUI object. On the right side of Inspector, check the checkboxes for properties that clearly define the object you are targeting. Checking the checkbox for the Name property with the “Username” value updates the left part of Inspector, where all objects in RpaLoginTest that meet the selected properties are now displayed.

TutorialInspectorFirstIdentification.png
Figure 6 Identifying the GUI element by Name property

However, as the identification is still not unique because there are two objects in RpaLoginTest that have “Username” as the Name property, you need to select another property that identifies the object uniquely. In order to know which of the two remaining objects is the one you want to look for with the robot, on the left of Inspector click on the first Username object sought, which is a “Text” type; this highlights the object you have marked in Inspector in green in RpaLoginTest.

TutorialInspectorElementChoose.png
Figure 7 Selecting an object in the Inspector
TutorialInspectorElementRecognition.png
Figure 8 Marking the selected object

You can now see that this object is not the one you initially targeted, so, in Inspector, select the second object, which is an “Edit” type, from the list on the left.

TutorialInspectorAiming.png
Figure 9 Marking the selected object.

According to the green highlighting in RpaLoginTest, this is the object you want to find, so now check the checkbox next to the Control Type parameter, which has the value “Edit”, on the right. Now there is one object on the left side of Inspector, indicating that the object can be uniquely identified using these two selected properties.

TutorialInspectorSecondIdentification.png
Figure 10 Uniquely identifying the GUI element by adding the Control type property

The object is now correctly identified. Another part of Inspector allows you to insert the type of action you want to carry out with the object in the resulting Python expression. In the Type of Action combo box, select “send_text”.

TutorialInspectorTypeOfAction.png
Figure 11 Selecting Type of action

You now have the Python expression app.find_first(cf.edit().name("Username")).send_text("") complete for use in the robotic script. The resulting expression can be copied using the copy button.

TutorialInspectorCopyButton.png
Figure 12 Button for copying the resulting expression

After inserting the Python expression in the script, you need to add the text that the robot is to write in the Username field. Pass the string to be written in the edit field as a parameter to the send_text method.

Java applications

If you view a Java application in Inspector (e.g. RpaLoginTest.jar, which can be found in TutorialApps),

you may notice that, in the element tree, the element icon changes and the elements are framed in purple, otherwise the work with the Java elements is the same. Java Access Bridge must be enabled to work with Java elements. Find out how in Inspector documentation.

InspectorJavaElement.png
Figure 13 Java elements in Inspector

Using the crosshair – analyzer

There are two modes for working with the crosshair. With the basic version of the crosshair behavior, after clicking the left mouse button on the crosshair icon, keep the mouse button pressed and analyze the elements while hovering the cursor in the required application. When you move the cursor over the various elements, you can see a color frame displaying the element being targeted. At the same time, in area number 3 in Inspector the parameters of the element that is currently being targeted are displayed. After you have moved over the required element and released the mouse button, the application analysis is completed and the element properties are loaded into Inspector.

The second option for special cases works by pressing and holding the CTRL key before clicking on the crosshair icon. After clicking on the crosshair icon, you can release the CTRL key and you do not need to have the mouse button pressed down. Inspector now analyzes the elements until the CTRL key is pressed, allowing you, for example, to target and load the parameters of the element appearing after your user activity in the application, e.g. if you want to target an item in the menu that appears after clicking on the parent menu.

VisualElement tab

Inspector also offers support in case the robotic application's graphical interface cannot be broken down into GUI elements and you need to use images for identification purposes. This support can be found on the VisualElement tab. Because this issue is more complex and requires further knowledge, the tutorial for it has been left until the chapter Image Information

InspectorVisualElement.png
Figure 14 VisualElement tab

A list of all options and the configuration of Inspector can be found in Inspector documentation.