Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Issues with tree widget
Issues with tree widget [message #557864] Thu, 09 September 2010 09:43
Ullas is currently offline UllasFriend
Messages: 10
Registered: September 2010
Location: Bangalore
Junior Member

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 or, 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? getNodes() and gettems()

Thanks in advance,

Previous Topic:Strategy to have SWTBot test cases working accross different windowing systems
Next Topic:Running SWTBot headless on Linux
Goto Forum:

Current Time: Tue Jun 19 01:16:43 GMT 2018

Powered by FUDForum. Page generated in 0.01981 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top