Setting the Flex Select Method to Use Name or Index

You can record Flex Select methods using the Name or Index of the control that you select. By default, Silk Test records Select methods using the name of the control. However, you can change your environment to record Select events using the index for the control, or you can switch between the name and index for recording.

  1. Determine which class you want to modify to use the Index. You can record Select events using the index for the following controls:
    • FlexList
    • FlexTree
    • FlexDataGrid
    • FlexOLAPDataGrid
    • FlexComboBox
    • FlexAdvancedDataGrid
  2. Determine which XML file is related to the class that you want to modify. The XML files related to the preceding controls include: FlexCommonControls.xml, AdvancedDataGrid.xml, or OLAPDataGrid.xml.
  3. Navigate to the XML files that are related to the class that you want to modify. The XML files are located in the <Silk Test_install_directory>\ng\agent\plugins\com.borland.fastxd.techdomain.flex.agent_<version>\config\automationEnvironment folder.
  4. Make the following adaptations in the corresponding XML file.
    <ClassInfo Extends="FlexList" Name="FlexControlName"  EnableIndexBasedSelection=”true” >
    
    …
    
    </ClassInfo>
    
    For instance, you might use "FlexList" as the " FlexControlName" and modify the FlexCommonControls.xml file.

    With this adaption the IndexBasedSelection is used for recording FlexList::SelectIndex events.

    Note: Setting the EnableIndexBasedSelection= to false in the code or removing the boolean returns recording to using the name (FlexList::Select events).
  5. Re-start your Flex application and the Open Agent in order for these changes to become active.