Forum Discussion

winston's avatar
winston
Occasional Contributor
10 years ago

How can I make Test Complete recognize an Infragistics valuelistdropdown as a combo box?

I'd like to be able to use "ClickItem" on a ValueListDropDownUnsafe form in a cell of an Ultragrid, but Test Complete was "unable to find object"- so for now I am only able to click the dropdown button and click an item by coordinates, which is unreliable because the list items can change.

3 Replies

  • Marsha_R's avatar
    Marsha_R
    Icon for Champion Level 3 rankChampion Level 3

    In the Advanced view of Object Spy, you should be able to find a row for Items.  That's the list of things in the combo box and you can pick them by number and maybe by name.

  • Ravik's avatar
    Ravik
    Super Contributor

    Try below code - I used it for Infragistics valuelistdropdown, this may help you...

     

     

    intDropDownItemCount = objDropdownName.Items.Count

    IF intDropDownItemCount > 0 Then

    For i = 0 to intDropDownItemCount-1

     

    objDropdownName.set_SelectedIndex(i)

     

    strDropDownValue = objDropdownName.Text

     

    IF expectedValue = strDropDownValueThen

    log.message ("Pass")

    objDropdownName.click

    Exit for

    End IF

     

    Next

    Else

    log.message ("Fail")

    End IF