var chars = 'abcdefghijklmnopqrstuvwxyz1234567890';
var string = '';
for(var ii=0; ii<15; ii++){
string += chars[Math.floor(Math.random() * chars.length)];
}
alert(string + '@gmail.com');
// Generates a random "Gmail"
it('should input random email into input field', async () => {
const characters ='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
function generateString(length) {
let result = ' ';
const charactersLength = characters.length;
for ( let i = 0; i < length; i++ ) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
return result;
}
let input = await $('#email')
await input.addValue(generateString(10) + '@gmail.com')
await browser.pause(4000);
})
createRandomEmail() {return "Username" + Math.floor(Math.random() * 10000 ) + "gmail.com" }