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

Can anyone please tell me how to select next 5th business date from calendar using QTP/UFT ?

1 Answers   Cigniti Technologies,


For Usability testing, which is preferable Automation or Manual?

6 Answers  


one screen page,that contains file , browse , update and cancel buttons.when we browse a file it should get update otherwise it should go to previous page.write negative test case for that.

0 Answers   Mindlance,


What is the new version of qtp which is recently released in the market?

0 Answers  


Explain types of descriptive programming?

0 Answers  






Hi, I want to pass a value in to Link object. For ex: I have a link where in which contains the value like "DC4463219(Active)". Whenever i will execute the script this value "DC4463219 (Active)" will get changed. I got the value DC4463219(Active) from the link and stored that value in variable "ACTUAL". If i want to select the same link again, while recording the value DC4463219(Active) will be recorded in object repository. So, that it will not work for the next cycle of execution as the value will get changed everytime as i mentioned above. I want to pass that Acutal value in to link object. The script is as follows: Actual Script when recording: Browser("Web Login").Page("Application").Frame ("ScopeFrame").Link(DC4463219(Active)".Click But now instead of this DC4463219(Active) i want to pass a variable where i have the same value. I tried to execute the script Browser("Web Login").Page("Application").Frame ("ScopeFrame").Link(Actual).Click But it is displaying the error message as that the value which we got from Actual is not existing in Object repository. So,i made the link object as regular expression. Even it is displaying the same message as mentioned above. If you are not able to understand, feel free to contact me with nbabu11@gmail.com

1 Answers  


Hi guys i'm prepareing for interview question for qtp i don't have bayground for vb scipt language can any one tell me it is easy to do job in qtp without bayground.

3 Answers  


How to get Traceability matrix from TD?

0 Answers  


How we can import data from database?

0 Answers  


How will you send values to a cell in a webtable using QTP?

2 Answers  


While spliting an action in QTP 10.0 getting an error : "This Line is a part of Script Block.You cannot split the action on this line." how to re-solve this and split the script into actions?

0 Answers  


Take a situation when you are working with QTP, suddenly system has crashed.so you again start the system. My questyion is how can QTP directly opened when the system desktop appears.

1 Answers  


Categories