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... OpenText™ Functional Testing for Developers .NET SDK Version: 25.2 OpenText™ Functional Testing for Developers SDK 25.2 All View Local Help Center View Online Help Center Version: