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

with out using import sheet came is it possible to get the excel sheet ?

2 Answers   Ordain Solutions,


what are the different kinds of frameworks in automation?

2 Answers   Accenture,


How can we test an XML using QTP? I have been to an interview, where they have given me an XML which had 15 values and they have given those values on a separate page. They asked me to write a QTP script to check the XML is having those particular 15 values.

2 Answers  


If some requirements r changed during the testing process ,then how can u handle this in frame work?

1 Answers  


Explain qtp(quick test professional)?

0 Answers  


1.Write a CRITICAL test cases for calculator ? 2.What is the difference b/w FRS and SRS documents ? 3.What is Component ? 4.What is object ? 5.what is the difference b/w static and dynamic descriptive programming ?

0 Answers   HP,


If there are some browsers opened and I don't how many browsers are open, Now I want to close all the browsers that I don't know how many are opened. What would be Descriptive programming for this in QTP using VB Script..??? Please send your answers.

6 Answers  


1) 100 test boxes there in application. how to click 100 test boxes using vb script? 2) 100 objects there in web page,how we will store that 100 objects repostries?

3 Answers   ANZ,


Am going to QTP testing......but i dont know coding languages like (c,c++,java,etc)and am not having interest in coding .............can i choose testing tools like qtp to learn and get a job in software......please reply me

1 Answers  


What is Object Spy?

8 Answers  


1)Difference Between Value & RawValue?

2 Answers   Wipro, Zensar,


Hi What are re-usable actions in QTP? -Thank You

5 Answers   Siemens,


Categories