Pages

Tuesday, November 13, 2012

Quick Test Professional (QTP) - RandomNumber Object

This object provides a method to get a random number between twp specified values.

'This will randomly assign a number to x between 1-200
x = RandomNumber.value(1, 200)

Since value is the default property for RandomNumber object, we can also use the 
following syntax:

'This will randomly assign a number to x between 1-200
x = RandomNumber(1, 200)


Parameter Options Dialog Box (Random Number)

This dialog box enables you to define settings for a random number parameter.
The image below shows the dialog box that opens when you select to parameterize a checkpoint expected value. The dialog boxes for parameterizing other value types such as argument values, object property values, and output storage locations provide similar options.



No comments:

Post a Comment