SelectRange Method

Class

ListBox and ListView.

Action

Selects a range of items in the extend-selection list, list box, or listview.

Availability

This functionality is supported only if you are using the Classic Agent.

Syntax

object.SelectRange (StartItem, EndItem)
Variable Description
StartItem The first item to select. LISTITEM.
EndItem The last item to select. LISTITEM.

Notes

  • SelectRange selects a continuous range of items in a list. The range selected is inclusive of the StartItem and EndItem.
  • For additional information on specifying StartItem and EndItem., see LISTITEM Data Type.
  • After selecting the items, Silk Test Classic verifies that the items were actually selected and generates the exception E_CONTROL_NOT_RESPONDING if they were not.
  • You cannot use this method with single-selection lists.
  • The SelectRange method is not available in the ListViewEx class, which is the equivalent of the ListView class on the Open Agent. To achieve the same functionality for a listview on the Open Agent, use the Select method of the ListViewEx class.

Example

DialogBox1.Elements.SelectRange ("wind", "fire")