Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » [Solved] Table: selecting row by two column values
[Solved] Table: selecting row by two column values [message #1072645] Tue, 23 July 2013 07:52 Go to next message
Mike Airey is currently offline Mike AireyFriend
Messages: 11
Registered: July 2013
Junior Member
Hi all,

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

[Updated on: Thu, 08 August 2013 02:32]

Report message to a moderator

Re: Table: selecting row by two column values [message #1073656 is a reply to message #1072645] Thu, 25 July 2013 08:48 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi Mike,

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 Smile

Best regards,
Alex
Re: Table: selecting row by two column values [message #1073748 is a reply to message #1073656] Thu, 25 July 2013 12:24 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi again,

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 Smile

I haven't tested this out, but I thought I'd share the team's idea with you.

Best regards,
Alex
[Solved] Table: selecting row by two column values [message #1082045 is a reply to message #1073748] Thu, 08 August 2013 02:31 Go to previous messageGo to next message
Mike Airey is currently offline Mike AireyFriend
Messages: 11
Registered: July 2013
Junior Member
Hi Alex,

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
Re: [Solved] Table: selecting row by two column values [message #1082202 is a reply to message #1082045] Thu, 08 August 2013 08:17 Go to previous message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Great to hear Smile thanks for the feedback, which I've also passed on to the team.
Previous Topic:Testing a system tray item
Next Topic:Newly created project version is not visible on the list
Goto Forum:
  


Current Time: Tue Aug 04 09:30:39 GMT 2020

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

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

Back to the top