TestProject Forum

Issue of select option by index

I use this method to genarate a random number.

And then pass this parameter to this index of method select option by index, but got below exception. It works fine last time, is there any update of this method?
And if I use the number directly instead of the parameter, the method works fine.

Hello @marco.xu,

There is currently an issue in which numbers are generated with trailing zeros(e.g 1.0 instead of 1)
I can give you a temporary solution to convert 1.0 to 1, you can use this addon to achieve this:

Thank you @artem.kuznetsov, but I cannot find the action you metioned.
Please let know when the issue has been fixed.

Hello @marco.xu,

Sorry my bad, that is an account addon, that is the reason you can’t see it,
I will ask for this addon to be uploaded, for now you can achieve this using the “Execute JavaScript” action:

this is the script:

var intvalue = Math.round(5.0);
return intvalue;

Instead of 5.0 you can input a parameter.

1 Like