Work with embedded objects in Flex Lists, Tables, or Tree-Views

Following the retirement of the Adobe Flash Player, UFT One no longer supports the Flex Add-in by default.

If you require the Flex Add-in, contact OpenText Support.

Sometimes, Flex objects are embedded inside of other non-container Flex objects. For example, a Flex table cell or a Flex list item might contain edit boxes, text boxes, or check boxes.

UFT One does not identify these objects when using the Object Spy, recording on Flex applications, or learning Flex objects.

However, for Flex objects embedded or contained inside FlexList, FlexTable, or FlexTreeView objects, you can manually add steps to your test or component that retrieve the embedded objects. After you retrieve these child objects, you can use them as you would other test objects, though they are not stored in the object repository.

This task describes the steps you can use to access and test Flex objects embedded in FlexList, FlexTable, or FlexTreeView objects.

  1. Record or learn the containing FlexTable, FlexList, or FlexTreeView objects.

  2. (Optional) Activate the containing table cell, list item, or tree-view node, using the FlexTable.SelectCell, FlexList.Select, or FlexTreeView.Select methods.

    In some situations, this changes the embedded objects. In others, it is required in order to bring the containing object into view.

  3. Retrieve the embedded Flex objects using the FlexTable.GetCellChildObjects, FlexTreeView.GetItemChildObjects, or FlexList.GetItemChildObjects methods.

    In these methods, you can provide a Description parameter that limits the returned child objects to the ones that match the description.

  4. (Optional) Iterate through the collection of returned test objects to check what objects are contained inside the FlexTable cell, FlexList item, or FlexTreeView node to perform operations on the different objects.

  5. Add steps to your test or component that perform operations on the embedded objects. For example, add Set steps on FlexSpin, FlexEdit,or FlexChHi eckBox objects.

    You can also perform steps on embedded objects without retrieving them, by clicking the relevant location inside the containing object. To do this, for example, use the FlexTable.SelectRow, FlexTreeView.Select or FlexTable.SelectCell method, providing the relevant coordinates within the row, node, or cell.

  6. Check the properties of embedded objects. You can do this using the CheckProperty or GetROProperty methods, or checkpoints.

    To create a checkpoint to use for an embedded object, create the checkpoint on an object of the same type that is not embedded. The checkpoint is stored in the object repository and you can then use it for the embedded object, as demonstrated in the following example:

    'Retrieve child objects from Options column in the table's first row
    Set child_buttons = grid.GetCellChildObjects(0, "Options")
    'iterate through all retrieved options and run a checkpoint on each
    For n=0 to (child_buttons.count-1)
        child_buttons(n).Check CheckPoint("Option_radiobutton")
    Next