Open topic with navigation

Select Method (IComboBox)
Selects an item from the combo box.
Overload List

Overload | Description
--- | ---
Select(Int32) | Selects an item from the combo box.
Select(String) | Selects an item from the combo box.

Example

    // This example selects items from a combo box using index and string values.

    private void ChooseFlightSourceAndDestination()
    {
        // Identify the "from city" combobox
        var fromCityComboBox = _flightGUIAapplicationWindow.Describe<IComboBox>(new ComboBoxDescription
        {
            ObjectName = @"fromCity"
        });

        // Select an item in the combo box using a (0-based) numeric index.
        fromCityComboBox.Select(3);

        // Identify the "to city" combo box
        var toCityComboBox = _flightGUIAapplicationWindow.Describe<IComboBox>(new ComboBoxDescription
        {
            ObjectName = @"toCity"
        });

        // Select an item in the combo box using a string value.
        toCityComboBox.Select("London");
    }