title: How to perform a click on DataGridRow using UIAutomation (WPF)?
body: <p>I can perform a selection on DataGridRow (WPF). However, When a row is selected, I can't perform a click on it. </p>
  
  <p>Here is my code:</p>
  
  <pre><code> AutomationElement a = UiElement.AutomationElement;     
   var DataGridRowsCondition = new System.Windows.Automation.PropertyCondition(AutomationElement.ClassNameProperty, "DataGridRow");
   var DataGridRows = a.FindAll(TreeScope.Subtree, DataGridRowsCondition);
   (DataGridRows[2].GetCurrentPattern(SelectionItemPattern.Pattern) as SelectionItemPattern).Select();
  </code></pre>