TestStack / UIAComWrapper

The UI Automation COM-to-.NET Adapter makes it possible to use the new Windows Automation API 3.0 COM interfaces, with their improved reliability and performance, while still using the same System.Windows.Automation classes as in earlier versions of UI Automation
Microsoft Public License
75 stars 50 forks source link

Select entire row of a data grid view #11

Open MonoAutomation opened 7 years ago

MonoAutomation commented 7 years ago

Uisng Treewalker ,i am able to get required row number from the grid but not able to select that row.

i have tried selection,invoke, and other pattern but everything is throwing error like un supported pattern. myrow=2 //example // to get row element) AutomationElement rowElementToSelect = requiredGrid.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.AutomationIdProperty, myrow.ToString()));

// get row header AutomationElement rowHeader = rowElementToSelect.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Header));

// invoke it (select the whole line) //((InvokePattern)rowHeader.GetCurrentPattern(InvokePattern.Pattern)).Invoke();

Environment: Windows forms,Infragistics,.netframework 4,

Can any one help to get the solution for this scenario?

drogit commented 7 years ago

oh buddy ... did you ever get this to work? i have same problem virtually. cant perform the default action on the row. then again, i cant even seem to get this project to work just yet. but i just a quasi newbie despite being old!