Quantcast
Channel: Windows Desktop Development for Accessibility and Automation forum
Viewing all articles
Browse latest Browse all 585

Select and double click a table item

$
0
0

I have just started using UI Automation to try and auomate testing of our in house applications.

I have managed to identify the various items in a table:

AutomationElementCollectiontableItem = tableList.FindAll(TreeScope.Descendants,newPropertyCondition(AutomationElement.ControlTypeProperty,ControlType.Custom));                  

                       

AutomationElement[] itemListArray =newAutomationElement[tableItem.Count];

                        tableItem.CopyTo(itemListArray,0);

                    

                       

intitemIndex = 0;

                       

intaeIndex = 0;

                       

foreach(AutomationElementaeinitemListArray)

                        {

                           

if(ae.Current.Name.ToString().Contains("New Application Wizard"))

                            {

                                itemIndex = aeIndex;

                            }

                            aeIndex++;

                        }

                       

                       

AutomationElementitemToSelect = tableItem[itemIndex];

The last line returns the required entry in the table. I need to be able to select and double click on this item.

 

Viewing all articles
Browse latest Browse all 585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>