I have a problem with selenium IDE when adding user extension. Code generates random emails correctly when in html but selenium seems not to concatenate “@mail.com” to generated string
In selenium:
randomString||8|mail||varName
Code I’m using is here:http://seleniumide.blogspot.com/2010/12/random-number-generator.html
And this is what I added:
function generateRandomMail( length, chars ) {
var string = '';
for ( var i = 0 ; i < length ; i++ )
string += chars[ Math.floor( Math.random() * chars.length ) ];
string = string+"@mail.com";
return string;
}
There will be probably error in this line:
I am not javascript expert, but it seems to me, that you are initializing that variable again. Try delete the
varat beginning at this line