Javascript random number generator does not work

I migrated from Selenium IDE for powerful features of Katalon Recorder. However I can’t make a javascript code work. The code is:

And the result is:

How can I make this work? I need to generate a random number and put it in a variable. Then use that value in the variable for filling a text box. Thanks in advance.

Selection_067.png

Selection_068.png

I figured out :).

Selection_071.png

3 Likes

Thanks for sharing your knowledge.

1 Like

I had the same issue …and there is something more :smiley:, you don’t have to use { and } just pure JS code is enough

runScript|return Math.floor(Math.random()*10000000)|random