I see that the code for select("String") forwarding the operation to code
that selects a group of nodes, but unfortunately doesn't return the single
selected item in this case as the SWTBotTreeItem, so it fails to chain in
the below example, while the getTreeItem("String") works as expected.
bot.tree().expandNode("C1").select("Debug").expand(); // fails to expand
Debug bot.tree().expandNode("C1").getTreeItem("Debug").expand(); // works
On 11/8/09 01:56, Jay Norwood wrote:
> It appears that is the way it is designed to work, since its pop-up help
> text indicates that it returns the current node (rather than a selected
> This is counterintuitive (at least to me). If I select something, I
> expect to get what I selected. You can add this to a list of gotchas for
> people who are starting out.
I suppose getting back an array of selected objects would be the expected
thing for multiple selections, and getting back a single one would return
a single object, but then the functions would need different names.
Maybe someone had a reason for the operation to select two children
You have a second form selects both children at the same time while the
first version selects one, then selects the second and clears selection on
It isn't really clear to me what all the requirements are. If you are
trying to provide support for gui recording, perhaps there should be
available api to do the equivalent of the gui actions for ctrl-select and