Share this page

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");
    }

Tips to improve your search results... UFT Developer .NET SDK Reference Version 15.0-15.0.2 UFT Developer SDK Reference All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: