07-30-2014, 04:11 PM
Hi QTPmate,
Its simple.You can do it in a couple of ways.I am just presenting the logic.
For alphabets you would be getting it from Array so no problem for that.
For numbers what you can do is , you can use vbscript "Time" function which would return 3:26:54 , which you can split using ":" as delimiter , get it in array , then append array(0) , array(1) , which would give you a random number.
Here is the code which you can change accordingly
Thanks,
Gangadhar
Its simple.You can do it in a couple of ways.I am just presenting the logic.
For alphabets you would be getting it from Array so no problem for that.
For numbers what you can do is , you can use vbscript "Time" function which would return 3:26:54 , which you can split using ":" as delimiter , get it in array , then append array(0) , array(1) , which would give you a random number.
Here is the code which you can change accordingly
Code:
str_randomno=Time
Dim aftersplitting
aftersplitting=split(str_randomno,":")
print aftersplitting(0)&aftersplitting(1)&left(aftersplitting(2),2)
Thanks,
Gangadhar