Forum Discussion

kcsahu777's avatar
kcsahu777
Contributor
13 years ago

ComboBox item select issue

I am using Test Complete 8.7

Application is in flex

I can select ComboBox item by using below, when the item can be viewed directly by clicking on the combo box

combobox.ClickItem("DE")




But this code does not work when the item is below down the list which u can only see by dragging the horizontal scroll bar after clicking on the combo box. The following error thrown for the above code



"There was an attempt to perform an action at point (1278, -108), which is out of the window bounds."



how to write generic code for this.
  • neha_renukdas's avatar
    neha_renukdas
    Occasional Contributor
    1) Add a 'point and fix' object of scrolling control from the object spy and use its mapping name

    Aliases.ABCD.WinFormsObject("PopupListBoxForm", "").WinFormsObject("PopupListBox", "").WinFormsObject("VScrollBar", "").Name



    OR



    2)  Enable the 'Autoscrolling methods' and then try.

    Aliases.ABCD.AddEditDomainColumns.AutoScrolling.Enabled;



    OR



    3) By pressing the down arrow keys of keyboard till the desired value option is reached.

    Aliases.ABCD.AddEditDomainColumns.xtraTabControl1.tbProperties.columnProperties.txtSourceExpression.Keys("[Down][Down][Down][Down]");