Collect GUI Elements Desktop

GUI elements can be collected "automatically" or "manually".

Manual GUI Element Collection

GUI elements can be collected after each test step by setting Collect After Step in the parameter file.
The collection of the GUI elements of the starting page can be done by creating a test with Sleep as only step and Collect After Step selected.
A Spider run can be started after the last step of a test by checking Run Spider after last step in the Run Configuration. The Spider will start over after closing all opened windows.

Automatic GUI Element Collection

Automatic GUI element collection is called Spider in MyITest4U.

The Spider treats a Desktop application as a tree. The Spider starts by collecting all GUI elements of the starting window. In the next step all GUI elements having one of the following ControlTypes are clicked.

  • Button
  • MenuItem
  • TabItem
  • TreeItem

After each click all new GUI elements are collected. After clicking all clickables the Spider starts over. The Spider goes on till no more new clickables are found. It is possible to run a Spider using first one ControlType then an other one.

Spider Configuration

GUI Element Identifier

Each GUI element has an identifier. The Spider uses this identifier to decide if two GUI elements are equal or not. The GUI element identifier is not used for anything else. It is not used to find GUI elements. The identifier contains the following GUI element properties:

Identifier Part Comment
AutomationId HandleAutomationId (automationElement, windowTitle)
ControlType
Name HandleName (automationElement, windowTitle)
HelpText HandleHelpText (automationElement, windowTitle)
ClassName HandleClassName (automationElement, windowTitle)
FrameworkId HandleFrameworkId (automationElement, windowTitle)
Window Title
MenuItemParentPath only GUI elements of the ControlType MenuItem

The identifier parts are separated by |. The Handle... methods can be used to change the identifier part to your needs e.g. The AutomationId in Java SWT applications of some GUI elements is different each time the application is started. HandleAutomationId (automationElement, windowTitle) allows you to define rules of how to handle AutomationId. The Handle... methods belong to the MyConfig class.

Excludes

GUI elements defined under Excludes are not clicked in a Spider run. An Exclude has to match an identifier part exactly. Excludes can be set in the Test Generation Editor under Config \ Spider \ Summary and Config \ Spider \ Global Excludes.