LDTP  3.5.0
 All Pages


selectindex('<dlgName>', '<object name>', <index>)


SelectIndex action will select an item from combo box where value of index is pointing to its position in list/menu.


Combo box will generally have a list as its child or a menu as its child. SelectIndex function will try to find whether child type is menu or list, if child type is list then there will be a text box associated with combo box. When child type is list, selects item at index value from list box and sets that value to the text box associated with combo box. If child type is menu, value specified in tha argument will be index of menu item, corressponding menu item will be selected.

In layered pane, this function call selects the object based on index.

Return values
1on success, LdtpExecutionError exception on failure

Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py

Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/combox_box.py

Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Combobox.cs


Selects the first folder / file in desktop

selectindex('x-nautilus-desktop', 'Icon View', 0)

Poornima pnaya.nosp@m.k@no.nosp@m.vell..nosp@m.com
Nagappan Alagappan nagap.nosp@m.pan@.nosp@m.gmail.nosp@m..com

Linux Desktop Testing Project