I am trying to figure out how to randomly select a row from a search results table. Does anyone have a suggestion (outside of using the parameters function in QTP)?
I need my test to select a different row each time it runs.
Record yourself selecting the first row, just so it puts the line of code into your script.
Then change the end of that line to use a variable instead of a constant for the selection index.
Before that line, use GetROProperty to get the rowcount of your results table into a rowcount variable.
indexvariable = int(rowcountvariable * Rnd) + 1)
And then you're set.
Note: leave off the + 1 if your results table index begins with zero (I think most of them do, but find out for sure).
"The last 10% of any software project will take 90% of the budgeted time. The first 90% will take the other 90%"