UI Automation not working for DataGridView
After trying out several solutions, I am in desperate need for help. I tried several approaches, before finally copying and still being stuck with the solution from Getting full contents of a Datagrid using UIAutomation . Let's talk code, please consider the comments: // Get Process ID for desired window handle uint processID = 0; GetWindowThreadProcessId(hwnd, out processID); var desktop = AutomationElement.RootElement; // Find AutomationElement for the App's window var bw = AutomationElement.RootElement.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.ProcessIdProperty,