Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » Selecting parent in SWT tree
Selecting parent in SWT tree [message #1130195] Wed, 09 October 2013 10:00 Go to next message
Torsten Janke is currently offline Torsten JankeFriend
Messages: 2
Registered: October 2013
Junior Member
Hi everybody,

I taking my first stept with Jubula. Setting up the first (simple) test cases were rather easy and straight-forward (well, a little learning was required but it was well within bounds Wink. Now I am trying to create a somewhat-more relevant testcase for my application, where I have trouble verifying that the test is ok.

Here is what I need to do: my application displays an SWT tree with some data in it, and based on some complicated logic auto-selects one node in the tree. I need to verify that the correct node is selected.
Trouble is, that the auto-selected node is not a node that uniquely identifies the selection, this is the parent element. A little illustration for this:

Root
+---Identifying node 1
| +--- node "abc" (auto-selected)
+---Identifying node 2
+--- node "abc"

So now I tried to select the parent via "ub_tre_selectNote_byIndexpath" node and check with "ub_tre_checkTextOfSelectedNode". For the selection I can give the path as "relative", set "pre_ascend" to 1...but then what? I cannot give 0 as "indexpath" (results in an error).

Can anybody give me a hint on this? Would be great!

Regards,
Torsten
Re: Selecting parent in SWT tree [message #1130417 is a reply to message #1130195] Wed, 09 October 2013 14:40 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1193
Registered: July 2009
Senior Member
Hi,

I had a try out as well and I don't think there's any way to pre-ascend and then not descend Wink

However, you may be able to work around it to solve your problem by using the left-key (may not be platform independent, or not active on your system) to move one level up and then perform a "check text of selected node" on that selection.

Hope that helps!
Alex
Re: Selecting parent in SWT tree [message #1131149 is a reply to message #1130417] Thu, 10 October 2013 08:39 Go to previous message
Torsten Janke is currently offline Torsten JankeFriend
Messages: 2
Registered: October 2013
Junior Member
Hi Alex,

the workaround works for me, thanks for the idea and quick reply Smile Still it would be good to have a "parent select" possibility, since using the workaround necessitates "tabbing" to the tree widget beforehand, which is kind of ugly. Anyways, I can live with the way it works now!

Regards,
Torsten
Previous Topic:Missing 'org.eclipse.jubula.feature' for target platform
Next Topic:"Default Event Handler" is triggered instead of my customized handler
Goto Forum:
  


Current Time: Sun Dec 21 22:23:02 GMT 2014

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

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