common, namespace, generate, random, number, scriptless, script-less, scripted, step, view, stepview

Method Zap.Common.GenerateRandomNumber

Returns a non-negative random integer

Watch this video to learn how to use this method

Have a problem with playback?

Usage

Function Zap.Common.GenerateRandomNumber ( 
    Integer MinValue [Optional],
    Integer MaxValue [Optional]
)

ZAP Utility

...RandomNumber

0

1000

random

MinValue

MaxValue

Output Parameter

Parameters

MinValue (optional)

Type: Integer

Default value: 0

The inclusive lower bound of the random number returned

MaxValue (optional)

Type: Integer

Default value: 1000

The exclusive upper bound of the random number returned. MaxValue must be greater than or equal to MinValue.

Returns

Random number

Example

VBScript

msgbox Zap.Common.GenerateRandomNumber(10, 100)

JavaScript

alert(Zap.Common.GenerateRandomNumber(10, 100));

Comment

Generate random number from 10 to 100 and save it to local variable

ZAP Utility

...RandomNumber

10

100

random

Contact Us

Tower Place 100

3340 Peachtree Rd NE #1800 

Atlanta, GA 30326 USA

(404) 814-5227