title: AutomateCollection's findAll function showing error evalute timed out maximum time
body: <p>Here is the code to get all tabs url for chrome. Its working sometime(if I restart VS15 or restart pc it works but not always in these case as well).</p>
  
  <pre><code>        Process[] procsChrome = Process.GetProcessesByName("chrome");
          string vals = "";
          foreach (Process chrome in procsChrome)
          {
              if (chrome.MainWindowHandle == IntPtr.Zero)
                  continue;
  
              AutomationElement element = AutomationElement.FromHandle(chrome.MainWindowHandle);
              if (element == null)
                  return;
              Condition conditions = new AndCondition(
                  //new PropertyCondition(AutomationElement.IsEnabledProperty, true),
                  new PropertyCondition(AutomationElement.IsControlElementProperty, true),
                  //new PropertyCondition(AutomationElement.IsContentElementProperty, true),
                  new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.TabItem));
  
              AutomationElementCollection elementx = element.FindAll(TreeScope.Descendants, conditions);
              foreach (AutomationElement item in elementx)
              {
                  //vals += ((ValuePattern)item.GetCurrentPattern(ValuePattern.Pattern)).Current.Value as string;
                  urls += item.Current.Name + " | ";
              }                 
          }
  </code></pre>
  
  <p>in the line written below the message shows when I try to debug the value. and get AutomationElementCollection array count to 0.</p>
  
  <blockquote>
    <p>AutomationElementCollection elementx =
    element.FindAll(TreeScope.Descendants, conditions);</p>
  </blockquote>
  
  <p>But it bring accurate result sometime as well. So how can I make it persistent for always?</p>
  
  <p>Here is a screenshot of when I get the result:</p>
  
  <p><a href="https://i.stack.imgur.com/9hTAx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9hTAx.png" alt=""></a></p>