18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
random letter
if I set :
Because it doesn't work ...
Is there an inclusion I 've missed ?
var $alphabet = "abcdefghijklmnopqrstuvwxyz";
var $new_letter = " ";
$new_letter = $alphabet.charAt(Math.round(26 * Math.random()));
It should return me a random letter no ?Because it doesn't work ...
Is there an inclusion I 've missed ?
Comments
I tried using your code and it works fine when i test it in evaluate window of the sahi controller. Where exactly are you facing the problem?
Regards,
Pankaj.
It's ok I've found the solution. It was in the declaration of my variable...
It works perfectly and I've created a randomly string generating function!
If anybody 's interested, let me know.
Ya that piece of code will be handy. I also need to generate some names on fly.
Regards,
Pankaj.
with : length_str = length of the random string you want to create
Regards,
Pankaj.