Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » SWTBOT testing trees with Label decorators applied
SWTBOT testing trees with Label decorators applied [message #503025] Thu, 10 December 2009 15:50 Go to next message
Atanas Todorov is currently offline Atanas TodorovFriend
Messages: 1
Registered: December 2009
Location: Bulgaria
Junior Member
Hi,
SWTBOT behaves inconsistently when trying to print the names of the children of TreeItem when there is a ILightweightLabelDecorator applied to to the tree.
The decorotor itself put [user version] to the end of the TreeItems.

List<String>nodes = bot.tree().expandNode("Organizations [not connected]")
.expandNode("Default Organization").expandNode("Services").getNodes();
System.out.println(node);

Each time the SWTBOT test is started it prints the TreeItems names in a different way ,most often only the first node do not have the suffix [user version] at the end ,but others have it.Running Eclipse application itself show all nodes with their proper suffix at the end.
Re: SWTBOT testing trees with Label decorators applied [message #503880 is a reply to message #503025] Wed, 16 December 2009 08:45 Go to previous message
Petar Petrov is currently offline Petar PetrovFriend
Messages: 10
Registered: July 2009
Junior Member
Hello Atanas,

This is beacuse lightway label decorators are executed in a separate thread
and decoration will not immediately appear in the view. You need to wait
until the tree has been decorated and then print the nodes. We use a custom
ICondition implementation which will wait until a node has the given label
before proceeding.

> Hi,
>
> SWTBOT behaves inconsistently when trying to print the names of the
> children of TreeItem when there is a ILightweightLabelDecorator
> applied to to the tree.
>
> The decorotor itself put [user version] to the end of the TreeItems.
>
> List<String>nodes = bot.tree().expandNode("Organizations [not
> connected]")
> .expandNode("Default
> Organization").expandNode("Services").getNodes();
> System.out.println(node);
> Each time the SWTBOT test is started it prints the TreeItems names in
> a different way ,most often only the first node do not have the suffix
> [user version] at the end ,but others have it.Running Eclipse
> application itself show all nodes with their proper suffix at the end.
>
Previous Topic:Get GEF edtior nested in a multi-page editor
Next Topic:How to detect if CAPS LOCK is on?
Goto Forum:
  


Current Time: Fri Dec 19 21:50:41 GMT 2014

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

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