jessica_mitran13 years agoGenerate random numbers in JScriptHello, Is there any way to generate random numbers in JScript scripts? I noticed that there is a Random() function in DelphiScript, but there are no analogous ones for JScript. JessicaShow More
karkadilValued Contributor12 years agoHere is an example of such code using the randInt() function I provided earlier.function generateTwoNumbers(){ var n1, n2; n1 = n2 = randInt(1, 9); while(n2 == n1) { n2 = randInt(1, 9); }}
Related ContentGenerate a random number within a rangeHow to generate a random Number, String, AlphaNumeric string[TechCorner Challenge #9] Generate a random number within a rangeGenerate JSON SchemasRename Test Case Number
Recent DiscussionsDynamic ObjectPulling in Dynamic Links from a web pageMultiple execution of a test plan with different values from an Excel tableYour thoughts about a REST API in TestCompleteKeyword Test - Click - use -1, -1 by default?