Generating test email ids
<p>Required solution for a problem:</p>

<p>Id is fixed ‘qualityassurance’ I want to generate ids like: <code>1- q.ualityassurance</code></p>

<p>For second run id should be like: <code>2- qu.alityassurance</code></p>

<p>For third run it should be like: <code>3- qua.lityassurance</code></p>

<p>and so on till id’s length. But i dont understand how to recall function for next run with incremented value.</p>

<p>Code is:</p>

<pre><code>Selenium.prototype.doNothing = function(){
    // The do in front of Nothing in the function is what tells the system this is a global function
}

Selenium.prototype.doRandomEmail = function(locator, num)
{
    var id = “qualityassurancetask”;
    var stringLength = id.length;
    var randomstring = ”;
    var insstring = ‘.’;
    var num = 1;

    //var rnum = Math.floor(Math.random() * stringLength);

    var remainingstring = id.substring(num,id.length);

    randomstring += id.substring(0,num).concat(insstring, remainingstring);
    randomstring += “@gmail.com”

    num= num+1;

    selenium.doType(locator,randomstring,num);
}
</code></pre>
