Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » SwtBotTree's getNode/getAllItems problem
SwtBotTree's getNode/getAllItems problem [message #665630] Fri, 15 April 2011 10:13 Go to next message
Aparna Argade is currently offline Aparna ArgadeFriend
Messages: 60
Registered: October 2010
Member
1. SWTBotTree's getAllItems() returns only first level children. Is there any way to get 2nd/3rd level children?
This problem seems to be discussed at many places. But still the behaviour is the same.

2. I want to select 2nd level node by using,
tree.expandNode(project).getNode(file).select();

Here it can not find the file node. Actually it is present.
I've seen that sometimes it has worked but most of the times it has failed.
Re: SwtBotTree's getNode/getAllItems problem [message #665793 is a reply to message #665630] Sat, 16 April 2011 01:18 Go to previous message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
Hi Aparna,


This happens because some trees expand in a lazy way(for performance
reasons) on a background thread.

You should be using getTreeItem() instead of getNode() to get around
this problem.

The getNode() is a fast way of accessing the item when you know that the
tree is eagerly populated and don't want the overhead of the waitUntil().

--
Ketan
http://ketan.padegaonkar.name | http://eclipse.org/swtbot | @ketanpkr

On 4/15/11 3:13 AM, Aparna wrote:
> 1. SWTBotTree's getAllItems() returns only first level children. Is
> there any way to get 2nd/3rd level children?
> This problem seems to be discussed at many places. But still the
> behaviour is the same.
>
> 2. I want to select 2nd level node by using,
> tree.expandNode(project).getNode(file).select();
>
> Here it can not find the file node. Actually it is present. I've seen
> that sometimes it has worked but most of the times it has failed.
>
Previous Topic:Different test results when running headless SWTBot
Next Topic:second level context menu
Goto Forum:
  


Current Time: Tue Apr 23 06:02:08 GMT 2024

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

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

Back to the top