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

what is keyword driven testing in qtp?n how is it useful?

0 Answers  


write a qtp script to verify that the business price is twice the economy price in flight reservation window

1 Answers  


Hi I am working with QTP.If I want to write a certification exams,Which one is the best one suggest me friends!!

2 Answers  


What are the Latest Feature are added In QTP 9.2?

2 Answers   Infotech,


what is Unicode Compatibility ? HOw does this makes a diffrence from Winrunner.?

2 Answers  


we r conduction testing on a project USING QTP, regarding that project the object repository is full ? Till that project having objects that r not recognised by repository, then what wil you do? How we wil recogine remailning objects? Is it possible to maintain another shared(or)peraction repository? what is the maximum capcity of object repository? How the technical people decide this much object repository is enoughf for this project?

7 Answers   AppLabs, CGI,


what is qtp automation frame work,what is the use of that frame work?

64 Answers   Cap Gemini, IBM, iGate, TCS,


I am just a beginner in QTP. Could any one explain me in detail how to automate adding two numbers and getting the result in QTP. Also I would like to parameterize the inputs. I have tried but getting an error like 'Can't use sub.....'(can't recollect the exact error)

2 Answers  


Use of Multiple Actions in QTP?

3 Answers  


Anybody wants to learn QTP with realtime implementations and complete framework desiging plz contact to this mail id ciraaj@gmail.com

1 Answers  


HI. Plz Clarifie my doubt,having 2+yrs experience in Testing , But My accedamics(Xth,INTER) are Less than 60%, But B.Tech 72%. It creats any problem , When i change to any MNC. plz tell me......... lot of friends told it's a problem, Some people says NO problem, What .............

3 Answers  


HOW CAN QTP AND TEST DIRECTOR CONNECTED TO THE DATABASE AND WHAT R THE OPTIONS?

0 Answers  


Categories