title: selecting combobox item using ui automation
body: <p>how do I select <strong>ComboBox's SelectedIndex = -1?</strong></p>
  
  <p>I wrote a code to automate testing:</p>
  
  <pre><code>AutomationElement aeBuildMachine = null;
  int count = 0;
  do
  {
      Console.WriteLine("\nLooking for Build Machine Combo Box");
      aeBuildMachine = aeTabitemmain.FindFirst(TreeScope.Descendants, new PropertyCondition(AutomationElement.ClassNameProperty, "ListBoxItem"));
      if (aeBuildMachine == null)
            throw new Exception("No Build Machine Combo Box");
      else
            Console.WriteLine("Found Build Machine Combo Box");
      ++count;
   }
  while (aeBuildMachine == null &amp;&amp; count &lt; 50);
  
  Console.WriteLine("Selecting Build machine from combobox...");
  SelectionItemPattern spBuildmachine = (SelectionItemPattern)aeBuildMachine.GetCurrentPattern(SelectionItemPattern.Pattern);
  </code></pre>
  
  <p>How do I use this <code>SelectionItemPattern</code>?</p>