Folders Pane (Options Dialog Box > GUI Testing Tab)
Relevant for: GUI tests and components
This pane enables you to add, remove, import, and export the search paths UFT One uses to search for tests, components, actions, or resource files. It also lets you specify the path type of a resource when you add the resource to your test.
Access the Folders pane
-
Do one of the following:
-
Ensure that a GUI test, action, or component is in focus in the document pane.
-
In the Solution Explorer, select a GUI test or component node or one of its child nodes.
-
-
Select Tools > Options > GUI Testing tab > Folders node.
Add a folder to the search list
A search list contains folders in which UFT One searches for tests, components, actions, or files.
If you add folders to the search list, you do not need to designate the full path of a test, component, action, or file in other dialog boxes or call statements. The order of the search paths in the list determines the order in which UFT One searches for a specified action or file. For components and application areas, all files must be stored in an ALM path.
-
Click to add a new folder to the search list. You can add a full path, a relative path, or an ALM path.
-
To add an ALM path:
-
When connected to ALM, click .
UFT One adds [ALM] and displays a browse button so that you can locate the ALM path.
-
When not connected to ALM, hold the Shift key and click .
UFT One adds [ALM] and you enter the path. You can also type the entire ALM path manually. If you do, you must add a space after [ALM]. For example: [ALM] Subject\Tests.
-
-
UFT One searches ALM project folders only when you are connected to the corresponding ALM project.
Import / export the folders search list
Supported on UFT One version 2023 and later
To reuse a folders search list across multiple UFT One computers, you can use the Import... / Export... button. Enter the folders on one UFT One computer, export the entered folders into a JSON file, and then import the file to other UFT One computers. This saves you the trouble of manually adding these folders.
Specify the resource path type
Supported on UFT One version 2023 and later
When adding a resource to your test, you can specify whether the resource is stored as an absolute path or a relative path in UFT One.
Choose one of the following options:
-
Always save relative path: Always saves the relative path of a resource when you add it to your test.
-
Always save absolute path: Always saves the absolute path of a resource when you add it to your test.
-
Ask me when I specify a path: (default) Select this option to be prompted to use a relative path every time you add a resource to your test. For details, see Remind me to use relative paths when specifying resources.
Convert your test's associated resources from absolute paths to relative paths
If your test resources are saved with absolute paths, you can update these absolute paths to relative paths. This conversion increases your test flexibility.
Do the following:
-
Set the resource path type to Always save relative path.
-
Open a test that has resources saved with absolute paths in UFT One.
UFT One displays a warning message in the Errors pane.
-
Double click on this warning message.
UFT One opens a dialog which enables you to convert the absolute paths to relative paths for resources associated with the open test.
-
In the dialog, select the resources for which you want to convert the path, and UFT One performs the conversion automatically.
Remind me to use relative paths when specifying a path to a resource
Supported on UFT One version 2022 and earlier
When associating a resource, you can choose to be prompted to use a relative path. For details, see Remind me to use relative paths when specifying resources.
Provide warning to replace relative paths for resources associated with test saved in ALM
Enables you display a warning in the Errors pane each time you open a test from ALM in which associated resources are saved with a relative path to the resource.
Important notes
-
The Restore Factory Defaults button resets all Options dialog box options to their defaults.
-
The current test or component is listed in the Search list by default. It cannot be deleted.
Relative paths are relative to this current test.
The list displays the relative path. Hover over the path to see the full path that UFT One uses for this path.
- You can use a PathFinder.Locate statement in your test to retrieve the complete path that UFT One uses for a specified relative path based on the folders specified in the Folders pane. For details, see the PathFinder object in the Utility Objects section of the UFT One Object Model Reference for GUI Testing.
-
If you are working with the Resources and Dependencies model with Quality Center or ALM, specify an absolute Quality Center or ALM path.
-
UFT One searches for the specified test, component, action, or file in the order in which the folders are displayed in the search list. If the same file name exists in more than one folder, UFT One uses the first instance it finds.
-
UFT One cannot resolve ALM folders paths specified in the Folders pane of the Options dialog box, if any of the folder names contain a forward slash.
Workaround: Remove the slash in the folder name in ALM or specify paths using this folder using absolute paths (instead of relative paths that reference the Folders pane).
See also: