Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forums[Solved] Table: selecting row by two column values
https://www.eclipse.org/forums/index.php/mv/msg/493756/1072645/#msg_1072645
Does anyone know how to get Jubula to select table rows based on two different column values?
My test case needs to select the first row with the appropriate value a in column A and value b in column B.
Values in columns A and B are not necessarily unique. So I kind of need to select based on the 'composite key' of a + b.
Currently I am using ub_tbl_selectValueFromColumn to select the first row matching a. Is it possible to retrieve the index of the currently selected row? If I had access to the row index, I could use ub_tbl_checkTextWithCellSpec to confirm that the value in column B of the selected row matched b.
Anybody had a similar problem?
Cheers,
Mike]]>Mike Airey2013-07-23T07:52:26-00:00Re: Table: selecting row by two column values
https://www.eclipse.org/forums/index.php/mv/msg/493756/1073656/#msg_1073656
Thanks for the description. I don't think there's any way to do this at the moment. There is the parameter "search type" which would let you select another cell relative to where you are now, but the two selects can't be combined.
I'm definitely not the expert in properties, but if there is a property that gives you the index of the currently selected row (I know there are properties for row count, maybe there's one for the current selection), then you could use the action StoreProperty and use the value from that in another step.
If you decide to write an extension, then use the rc dev lists for any help on doing that. If you'd like us to do it for you, then have a look here
Best regards,
Alex]]>Alexandra Schladebeck2013-07-25T08:48:11-00:00Re: Table: selecting row by two column values
https://www.eclipse.org/forums/index.php/mv/msg/493756/1073748/#msg_1073748
I mentioned this problem to the team and they came up with this. It's quite workaround-y, but you could probably write a module that hides most of the details.
Let's say you have a table like this:
a | b
a | c
b | d
a | d
And you want to select the row where a & d are (the last one).
The test could:
Select "a" from column 1 (first row is selected).
Move one cell to the right (0 clicks) and check text at mouse position -> is it d?
--> no, so Event Handler (retry) is activated: Select "a" from column 1 (*relative* search) and move one cell to the right (0 clicks)
The failed step is then retried -> is it d?
--> no, so Event Handler (retry) is activated: Select "a" from column 1 (*relative* search) and move one cell to the right (0 clicks)
The failed step is then retried -> is it d?
Yes
I haven't tested this out, but I thought I'd share the team's idea with you.
Best regards,
Alex
]]>Alexandra Schladebeck2013-07-25T12:24:36-00:00[Solved] Table: selecting row by two column values
https://www.eclipse.org/forums/index.php/mv/msg/493756/1082045/#msg_1082045
Worked great! Thanks to you and the team for this solution.
As an added bonus, there are a few more tests I can implement now using table move that I didn't think were possible.
Cheers again,
Mike]]>Mike Airey2013-08-08T02:31:57-00:00Re: [Solved] Table: selecting row by two column values
https://www.eclipse.org/forums/index.php/mv/msg/493756/1082202/#msg_1082202
thanks for the feedback, which I've also passed on to the team.]]>Alexandra Schladebeck2013-08-08T08:17:21-00:00