Description
Hi,
I am just starting out on White and I am getting the following error when trying to access the nodes of a tree within my .NET 4 app:
'An exception of type 'TestStack.White.Mappings.ControlDictionaryException' occurred in TestStack.White.dll but was not handled in user code
Additional information: Multiple TestControls found for ControlType=tree view item and FrameworkId: - TestStack.White.UIItems.TreeItems.Win32TreeNode, TestStack.White.UIItems.TreeItems.WPFTreeNode, TestStack.White.UIItems.TreeItems.Win32TreeNode'
The code is as follows:
List<Window> windows = application.GetWindows();
IUIItem customToolsAddInsButton = windows[0].Get(SearchCriteria.ByText("Custom Tools (Add-Ins)"));
customToolsAddInsButton.Click();
Panel customToolsPanel = windows[0].Get<Panel>(SearchCriteria.ByAutomationId("Function.CustomTools"));
Tree customToolsTree = customToolsPanel.Get<Tree>();
foreach(TreeNode node in customToolsTree.Nodes) // Exception thrown here
{
// do something
}
I am also using Visual UI Automation Verify and can see that the nodes are there (and can see them within the app UI). Within Verify, the hierarchy looks as follows:
- "pane" "" "Function.CustomTools"
- "tree" "" "5376242"
- "tree item" "This is some text"
Any help you can give is will be appreciated.
Thanks