Tuesday 8 April 2014

Generate Random Number in QTP

RandomNumber.Value(upperlimit,lowerlimit)

It would generate random numbers for that instance of QTP. But once QTP is restarted it will generate same numbers in same sequence. Example is shown in the images below.

Ex:

N=RandomNumber.value(1,15)

Its randomly pick the value from 1 to 15 and assign to N. Its randomly pick the any value for everytime QTP starts.

No comments:

Post a Comment