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 . 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:
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!
I had a try out as well and I don't think there's any way to pre-ascend and then not descend
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.
the workaround works for me, thanks for the idea and quick reply 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!