|Re: Iteration of items [message #1402967 is a reply to message #1402952]
||Fri, 18 July 2014 20:39
| David Hickernell
Registered: October 2012
You can use ub_grc_storeProperty to store the "itemCount" property of the Combo component in a variable (e.g. "COUNT"), use another variable (e.g. "INDEX") as a loop counter starting at 1, and use $INDEX in an event handler that calls ub_cbc_selectEntryByIndex and does whatever else you want.|
I think I have made a post explaining how to implement loop logic before, but I couldn't find it easily with a forum search, so here it is:
1. Use a Test Step to check (numeric values) for $INDEX > $COUNT.
2. In the same Test Case where you execute that step, add a "Check Failed" event handler with reentry type RETRY and max retries set to a number higher than the largest number of Combo items you ever expect to have.
3. In that event handler, execute whatever steps you want to (in this case, starting with ub_cbc_selectEntryByIndex as mentioned above).
4. At the end of the event handler, store the value "?trunc(?add($INDEX,1),0)" (without quotes) in the variable INDEX.
This should execute your event handler once for each value in the Combo, and then pass on the last retry.
Powered by FUDForum
. Page generated in 0.03276 seconds