Mapping Test Object Classes to Inner Objects

Within the MicTest root element of the toolkit configuration XML file, under the Key element where Name="Test Objects", you define one Key element for each custom Delphi test object class that you want to map.

The Name attribute of this Key element must contain the name of the custom Delphi test object class. For example, the excerpt below is part of the test object configuration file that maps the DelphiTrackBar test object class to the WinObject test object class that serves as its inner object:

<?xml version="1.0"?>
<MicTest>
...
  <Key Name="Test Objects">
    <!-- mapping for DelphiTrackBar -->
    <Key Name="DelphiTrackBar">
...
    </Key>
  </Key>
</MicTest> 

Within the Key element for each custom Delphi test object class define the following Value elements:

Name Attribute

Type Attribute

Element Use

Element Value

BottomLevelObject

I4

Optional

Specifies whether test objects of this type can contain other objects.

Possible values:

  • 0: Test object is not a bottom-level object. It can contain child objects. (Default)

  • 1: Test object is a bottom-level object. It cannot contain child objects.

CLSID

BSTR

Required

Required value: {A990252E-48C1-4d6c-9B55-4701BC29919C}

(Default)

BSTR

Required

The name of the custom Delphi test object class that you want to map.

ExtObjRecFilter

I4

Optional

Specifies which Windows messages UFT One passes to the Agent Object for recording.

Possible values:

  • 0: Only messages addressed to the control's window are passed to the Agent Object for recording. (All other messages are ignored.)

  • 1: All Windows messages are passed to the Agent Object for recording.

  • 2: Only messages addressed to the control or its children are passed to the Agent Object for recording. (All other messages are ignored.)

If this element is not defined, all recording is handled by the inner object.

InnerMicClass

BSTR

Required

The name of the existing Standard Windows test object class that you want to use as the inner object.

For a list of available test object classes, see the Standard Windows section of the UFT One Object Model Reference for GUI Testing.

InnerProgId

BSTR

Required

Mercury.<InnerMicClass>

Exceptions: For the following InnerMicClass values, set InnerProgId as specified below:

Window: Mercury.StdWindow

Dialog: Mercury.WinDialog

Static: Mercury.WinStatic

Desktop— Mercury.MicDesktop

tag query name

BSTR

Required

Required value: delphi_name