Menu

#228 ClassCastException in TreeItemTester

open
nobody
None
5
2006-09-14
2006-09-14
nauron
No

If you call
TreeItemTester.actionClickTreeItem(treePath, theTree,
1); you get a ClassCastException if the Tree has a menu
with a menuItem of the same name as the searched
treeItem. The problem is, it finds the menu instead of
the TreeItem. The problematic line:
TreeItemFinder on Line 807:
item = (TreeItem) finder.find(parentTree, new
TextMatcher(text));

should read:
item = (TreeItem) finder.find(parentTree, new
TextMatcher(text, TreeItem.class));

Discussion