|Issues with tree widget [message #557864]
||Thu, 09 September 2010 09:43
Registered: September 2010
I am new to SWTBot, and facing 2 issues when working with tree widgets.
1. I need to check existance of child nodes under a node before expanding the same. What would be the code for this check?
When I used treeitem.getNodes(), though its empty its returning some dummy item. Also the getNodes().isEmpty is false and getNodes().size always returns a count 1.
But the check "treeitem.getNode(0).getText().isEmpty()" is returning true when there is no child nodes. Is this the right way to corss check?
2. I wanted to point to a tree widget if it exist in a view. e.g I am searching for an object and if it is found, it would be available in a search view as a tree node. But when I use
view.bot().tree().isVisible() or view.bot().tree().isEnabled(), it always gives me true! eventhough the search fails and no tree widget available in the view.
How can I verify that the tree is present in the view before calling the getItem() of the same.
Also, please let me know what is the difference between a node and an item in the tree widget?
..like getNodes() and gettems()
Thanks in advance,
Powered by FUDForum
. Page generated in 0.01506 seconds