Method Common.GenerateRandomNumber
Returns a non-negative random integerUsage
Function ZAP.Common.GenerateRandomNumber (
Integer MinValue [Optional],
Integer MaxValue [Optional]
)
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