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



how to generate numbers in between to numbers suppose numbers in between 500 to 1000 in sequencies..

Answer / 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

More QTP Interview Questions

h u call the function

6 Answers   Wipro,


Which scripting language used by quicktest professional (qtp)?

0 Answers  


Analyzing the Checkpoint results ?

1 Answers   Crea,


Hi, i have a string like "INDIA". I need to display this string vertically in Msgbox?

1 Answers  


How can we see the analog recording steps in QTP..the Steps are stored in a track file with an extension .dat..how can we open the file..

1 Answers  






How to convert non-reusable action into reusable action in QTP?(i know by default QTP will take it as a non-reuable action )(Chandana) plz urgent?

4 Answers   Wipro,


After the execution of a script how do u upload the results to Quality Center. Pls anyone explain in detail. It is very urgent._______Thanks a lot!!

2 Answers   ABC,


requirement is for combo box your expected value is str= "Denver.Frankfurt.London.Los Angeles.Paris.Portland.San Francisco.Seattle.Sydney.Zurich" ar = Window("Flight Reservation").WinComboBox("Fly From:").GetContent your actual value is : that shows data in combo box how can u test the both data is correct or not by using split function

1 Answers   FIS,


What type of VB script u had done in expert view?

1 Answers  


when to start the automation?

2 Answers   Accenture,


what is the exact Diff. Between Test and Component in QTP?

1 Answers  


Why bpt?

0 Answers  


Categories