Example #1
0
        public void SelectNode(string itemText)
        {
            LogText = "Item: " + itemText;

            try
            {
                RegisterEvent(SelectionItemPattern.ElementSelectedEvent);
                AutomationElement control = SelectionPatternHelper.FindItemByText(UIAElement, itemText);
                SelectionPatternHelper.Select(control);
            }
            catch (ProdOperationException err)
            {
                throw;
            }
        }
Example #2
0
        public void SelectNode(int index)
        {
            LogText = "Index: " + index;

            try
            {
                RegisterEvent(SelectionItemPattern.ElementSelectedEvent);
                AutomationElement indexedItem = SelectionPatternHelper.FindItemByIndex(UIAElement, index);
                SelectionPatternHelper.Select(indexedItem);
            }
            catch (ProdOperationException err)
            {
                throw;
            }
        }