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

Method Zap.Common.GenerateRandomNumberAsString

Returns a non-negative random integer which is converted into a string

Watch this video to learn how to use this method

Have a problem with playback?

Usage

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

ZAP Utility

...NumberAsString

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 converted to string

Example

VBScript

msgbox Zap.Common.GenerateRandomNumberAsString(10, 100)

JavaScript

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

Comment

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

ZAP Utility

...NumberAsString

10

100

random

Contact Us

Tower Place 100

3340 Peachtree Rd NE #1800 

Atlanta, GA 30326 USA

(404) 814-5227