how to generate numbers in between to numbers suppose
numbers in between 500 to 1000 in sequencies using vbscript

Answer Posted / amarendra kothuru

Using loops in vb Script, you can generate numbers between
specified range

E.g:
For i= 501 to 1000
Reporter.ReportEvent micPass, "Value: " & i, "Number
between 500 to 1000"
Next
'gives the output as 501,502, 503, etc...

If you want generate random number between 500 to 1000, use
the function "RandomNumber(inbuilt function of QTP, but not
VB Sscript function)
E.g: var_Num = RandomNumber(500,1000)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I had installed QTP 9.2. It is working fine but whenever I open QTP, it is trying to reinstall the below-mentioned files again and again "QTP92PS82UPGRADE.exe", "recogn.dll". If anybody has these files, please provide those files in this site or you can send that files to my mail id also (lravi4u@yahoo.com). If you don't know where the files will be in the QTP, search in the QTP software CD or path of QTP program installed (C:\Program Files\Mercury Interactive\QuickTest Professional)

1463


How can i initiate the objects to find uniquely in OR

1471


I want to know what are QTP functons and what are VB script functions. What is the difference between them.When we have to use these functions.

1303


Please Don't mind .i want in detail the real time process i.e in each document what it contains.

1437


what you mean by artifact,milestone...

1495






How would you directly trigger javascript in a test?

1473


Tell me about qtp?

540


Why qtp always start action1 and does not start action?

605


What are the key points to create a framework in QTP for oracle forms?

1809


What is the default object synchronization timeout in qtp?

647


what is the difference between development and testing

2389


i need qtp tutorial. pls send it to sridhar.k151@g mail.com

1641


Hi,All How to create a link in excel sheet using qtp

3003


How to find array size in qtp?

585


How to break the object spy ?

664