Working with the ActiveX Add-in

Creating tests of your ActiveX application requires you to note a few special key points:

  • When you create a checkpoint on an ActiveX control, UFT captures all the properties for an ActiveX control, but it does not select any properties to check.

  • When testing ActiveX objects in a browser, the top-level ActiveX object is inserted within the standard Web object hierarchy, for example, Browser.Page.ActiveX.

  • UFT can record on standard controls within an ActiveX control and if an ActiveX control contains another ActiveX control, then UFT can record and run on this internal control as well. For example, suppose your ActiveX control is a calendar that contains a drop-down list from which you can choose the month. If you record a click in the list to select the month of May, UFT records this step in the Editor as:

    Dialog("ActiveX Calendars").ActiveX("SMonth Control").WinComboBox("ComboBox").Select "May"
  • When creating a programmatic description for an ActiveX test object and the relevant run-time object is windowless (has no window handle associated with it), you must add the windowless property to the description and set its value to True.

    For example:

    Set ButDesc = Description.Create
    ButDesc("ProgId").Value = "Forms.CommandButton.1"
    ButDesc("Caption").Value = "OK"
    ButDesc("Windowless").Value = True
    Window("Form1").AcxButton(ButDesc).Click