Searching for actions by used variables is described for existing releases:

  • Searching for actions by variables used for releases up to 2.19.0
  • Search for actions by used variables for releases from 2.20.0 onwards

Searching for actions by variables used for releases up to 2.19.0

In order to search by used variables you need to:

  1. Install the platform.

  2. Open the Studio.

  3. Create a robot.

A prerequisite is that variables and other resources must be created in the robot project.

The resource can be used as a parameter or a result depending on the needs , directly or as a property (e.g. winelement.xPath).

To do this, you need to:

On the top panel, click on the "Search" (Magnifier) button a search bar is displayed, inside of which it says "Searching for resource..." and a magnifier icon.

  • In the top panel of the Studio, click the search icon. Three tabs will be displayed: "Actions", "Resources" and "Contexts"

  • Select the Resources tab. The Resources tab is located between Actions and Contexts

  • In the list of variables, expand the list of actions where it is used

  • Click on the used action

Let's consider the following steps sequentially for searching for the used variables.

Action

1

Displaying the Resources tab and its search bar

2

Creating resources

3

There are resources in the project, but the resources are not being utilized anywhere

4

Search actions by used Variables

5

Search actions by used Files

6

Search actions by used Web elements

7

Search actions by used Win elements

8

Search for actions by resource properties used

9

Checking with several resources of the same type

10

Re-open the Studio and again check each tab on the "Resources" tab in the "Search" functionality

11

Checking when resources of different types are used simultaneously in one action

12

Search by partial match

13

Removing resources and resource properties from the parameters and results of resource actions

14

Deleting actions that use resources and their properties

15

Deleting resources

1. Display the Resources tab and its search bar

1.1 Select the Resources tab.

2 .  Creating resources

2.1 Creating a variable.

2.2 Creating a "file" resource.

2.3 Creating a web element resource.

where:

  • 1 – Resources tab

  • 2 – Create resource button

  • 3 – Input field for the attribute that the robot will refer to

  • 4 – Drop-down list where we will select the attribute

2.4 Creating a win-element resource

To create a win element you need to launch the spy. In the spy it is necessary to select the capture button and then already point at the necessary win element and by pressing the button LCTRL and LMB we capture the necessary element. After that we press the save button.

3.  There are resources in the project, but the resources are not used anywhere

Enter 1 in the "Resources" field

Enter “Variable 1”

Enter "File"

Enter "Web"

Enter " Win"

Since the resources are not used anywhere, there is no drop-down list near the resource record (no "Expand" button) and nothing happens when you click on the resource record itself.

4 . Searching for actions by Variables in use.

4.1 . Add two actions " Reverse 1" and "Reverse 2".

Add two actions " Reverse 1" and "Reverse 2".


In the " Reverse 1" action, specify the resource "Variable 1" as the input parameter "Text".


In the " Reverse 2" action, specify the "Variable 1" resource as the output parameter.

4.2. Click on the "Search" (Magnifier) button on the top panel, select the "Resources" tab and clear the search bar (see in section 1.1)

4.3. Activate the search by entering the word "Variable" into the search box

4.4. Expand the drop-down list of the "Variable" resource

4.5. Click on each item in the drop-down list: " Reverse 1" and "Reverse 2" *

If we click on " Reverse 1", "Reverse 2", we will be taken to the action itself, where this variable is used.

5. Search actions by used Files

5.1. Add two actions "Read text file 1" and "Open document 1" (for example, from the "Word" group).

5.2. In "Read text file 1" specify the resource "File 1" as input parameter

5.3. In "Open document 1" specify the resource "File 1" as input parameter

5.4. On the top panel, click on the "Search" button (Magnifier), select the "Resources" tab and clear the search bar

5.5. Activate the search by typing the word "File" into the search box

5.6. Expand the drop-down list for the "File 1" resource

5.7. Click on each item in the drop-down list: ""Read text file 1" and "Open document 1".


When you click on a line with the "Read text file 1" entry, the Studio scrolls through the script and focuses on the "Read text file 1" action, the properties panel displays the properties of the "Read text file 1" action

When you click on the row with the "Open document 1" entry, the Studio scrolls through the script and focuses on the "Open document 1" action, and the properties panel displays the properties of the "Open document 1" action.

6. Search for actions by the Web-elements used

6.1. Add two actions "Send Text 1" and "Send Click 1".

6.2. In "Send text 1", specify the resource "Web-element 1" as the input parameter.

6.3. In "Send click 1", specify the resource "Web-element 1" as the input parameter.

6.4. On the top panel, click the "Search" (Magnifier) button, select the "Resources" tab, and clear the search bar.

6.5. Activate the search by entering the word "Web-element".

6.6. Expand the drop-down list for the resource "Web-element 1".

6.7. Click on each item in the drop-down list: "Send text 1" and "Send click 1".

When you click on a row with a "Send text 1" entry, the studio scrolls through the script and focuses on the "Send text 1" action, the properties panel displays the properties of the "Send text 1" action When you click on a row with a "Send click 1" entry, the studio scrolls through the script and focuses on the "Send click 1" action, the properties panel displays the properties of the "Send click 1" action

7. Search for actions by the Win-elements used

7.1. Add two actions "Window focus element 1" and "Get element text 1".

7.2. In "Window focus element 1", specify the resource "Win-element 1" as the input parameter.

7.3. In "Get element text 1", specify the resource "Win-element 1" as the input parameter.

7.4. On the top panel, click on the Search (Magnifier) button, select the Resources tab, and clear the search bar.

7.5. Activate the search by typing the word "Win-element" into the search box.

7.6. Expand the drop-down list at the resource " Win-element".

7.7. Click on each item in the drop-down list: "Window focus element 1" and "Get element text 1".

When you click on the line with the entry "Window focus element 1", the studio scrolls through the script and focuses on the action "Window focus element 1". The properties panel displays the properties of the "Window focus element 1" action.

When you click on the row with the "Get element text 1" entry the studio scrolls through the script and focuses on the "Get element text 1" action and the properties of the "Get element text 1" action are displayed in the properties panel.

8. Search for actions by the resource properties used

8.1. Add the "Convert data 1" and "Replace matches 1" actions.

8.2 . In the "Convert Data 1" action, specify the resource property "Win-element 1" : "Win-element 1.WindowName" as the input parameter.

8.3. In the "Replace Matches 1" action, specify the resource property " Win-element 1" : "Win-element 1.Definition" as the output parameter.

8.4. On the top panel, click on the "Search" (Magnifier) button, select the "Resources" tab.

8.5. Activate the search by entering " Win-element" into the search.

8.6. Expand the drop-down list for the resource " Win-element 1".

8.7. Add actions "Convert data 2" and "Replace matches 2".

8.8. In the "Convert data 2" action, specify the "Web-element 1" resource property : "Web-element 1.XPath" as the input parameter.

8.9. In the "Replace matches 2" action, specify the resource property "Web-element 1" : "Web-element 1.DisplayName" as the output parameter.

8.10. On the top panel, click the Search button (Magnifier), select the Resources tab. Activate the search by entering "Web-element" Expand the drop-down list for the resource "Web-element 1".

8.11. On the top panel, click the Search button (Magnifier), select the Resources tab. Activate the search by entering "File" in it Expand the drop-down list for the resource "File 1" on the "Files" tab.

8.12. On the top panel, click on the "Search" button (Magnifier), select the "Resources" tab. Activate the search by entering the number "1" in it Expand the drop-down list for each of the resources.

9. Checking with several resources of the same type

9.1 Create several more resources (e.g., 5-10 more each):

  • several variables.

  • several file resources.

  • several web-elements.

  • several win-elements.

9.2. Add many different actions to the script, in the parameters and results of which you specify the newly created resources and the properties of these resources (this applies to all resources except variables).

9.3. On the top panel, click on the "Search" button (Magnifier), select the "Resources" tab and check each of the resource types by activating the search by typing the resource name.

10. Reopen the studio and again check each tab on the Resources tab in the Search functionality

11. Checking when resources of different types are used simultaneously in one action

11.1. Add the "Add object 1" action to the script, increase the number of parameters.

11.2. In the "Object" parameter, specify the resource "Variable 1".

In the "Object 1" parameter, specify the "File 1" resource property : "File 1.Value".

In the "Object 2" parameter, specify the "Web-element 1" resource property : "Web-element 1.XPath".

In the "Object 3" parameter, specify the resource property "Web-element 1" : "Web-element 1.Definition".

11.3. On the top panel, click on the "Search" (Magnifier) button, select the "Resources" tab, and check each resource by activating the search by typing the resource name.

12. Search by partial match

12.1. In the Studio settings in the "Exact match search" field uncheck the box, if checked.

12.2. Enter in the search field: "Variable".

12.3. Enter in the search field: "File".

12.4. Enter in the search field: "Web-element".

12.5. Enter in the search field: "Win-element".

13. Deleting from parameters and results of resource actions and resource properties.

13.1. Remove all references to resources from all parameters and action results.

13.2. On the top panel click on the "Search" button ( Magnifier), select the "Resources" tab and check each resource by activating the search by resource name. There is a bug: if you remove variables from actions and search in resources, it will still show that the variable in the action is used, although this variable is removed from the action. Only reloading the studio helps.

14. Deleting actions that use resources and their properties

14.1. Specify resources and their properties in the parameters and results of actions..

14.2 .Delete some actions in which resources are used.

14.3. In the top panel, click on the "Search" button (Magnifier), select the "Resources" tab and check each resource by activating the search by resource name.

Let's delete the "Read text file" action.

Result

15. Deleting resources

15.1. Specify resources and their properties in the action parameters and results.

15.2. Delete all resources.

15.3. In the top panel, click on the Search button ( Magnifier), select the Resources tab and check each resource by activating the search by resource name.

Let's remove the File parameter and check.

Result


As you can see the search did not yield any results as the resource has been removed.

Search for actions by used variables for releases from 2.20.0 onwards

On the Resources tab, a search field has been added to all tabs.
The field is located on each tab in the upper right corner.
The search bar is located at the top, as shown in the screenshots below.

Search bar on the Variables panel

Search bar in the "Tracked Variables" panel

Search bar on the Files panel

Search bar on the Web Elements panel

Search bar on the Win Elements panel

The search is general, i.e. when you enter a word/phrase in the field, Studio searches for words/phrases across the tabs of all resources. The results are displayed in the same way as in an action search: only the tabs with matches remain on the left, but only resources of the corresponding type are displayed on each tab.
Only the current resource tab is searched. If you switch to another tab, the entered text in the search box is deleted. But when you return to the previous tab, the text entered in the search box remains.
Example: 
Open the Variables tab.

Type "test" into the search box.

All found variables are displayed on the current resource tab. Switch to the Files tab. The search string is empty. We return to the "Variables" tab. The entered "Test" remains in the search box.

The Web Elements and Win Elements panels show groups with found items when you search for a resource. Only those groups that contain the found items are displayed. If a group has a match in its name but does not contain matching items, the group will not appear in the result.
If you click on a group, the list with the elements found in it will be opened.
It is possible to search by strict match and non-strict match depending on the corresponding parameter from the Studio settings, i.e. the same way as other search fields work now.
The enabled "Strict Matching" option should work with resource searches in the same way as with other searches
The win- and web-elements tabs display search results without grouping them, or at least only groups with matches by element name are displayed, with the groups themselves expanded.
Web Elements panel:

Win-elements panel:

Along with search you can use filtering and sorting. Sorting will sort the found files or variables, since sorting is implemented only on the "Files" and "Variables" tabs. Filtering will output unused resources (since only one "Unused" filter is currently implemented.

Each unused resource in the scheme will have an exclamation mark icon. More information can be found here Exclamation mark at unused resources.

  • Нет меток