juzjus10 / Epic-Account-Creator

Apache License 2.0
23 stars 18 forks source link

Suggestion #26

Open Bafmaaan opened 4 years ago

Bafmaaan commented 4 years ago

Random password? So u dont have same password on all acs?

xpeedo commented 4 years ago

you can use a function like this

var rand_pwd;
function generateString(length) {
   var result           = '';
   var characters       = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
   var charactersLength = characters.length;
   for ( var i = 0; i < length; i++ ) {
      result += characters.charAt(Math.floor(Math.random() * charactersLength));
   }
   return result;
}

//so when you want to set the password, use this:

rand_pwd = generateString(16);
await driver.findElement(By.name('password')).sendKeys(pwd);
//rest of code...
account = email + ":" + rand_pwd + '\n';
fs.writeFileSync("civ6_new_accounts.txt", account_file + account);
//catch...
account = email + ":" + rand_pwd + "(incomplete)\n";
fs.writeFileSync("civ6_new_accounts.txt", account_file + account);
bushshrub commented 4 years ago

Alternatively you can hook into a password manager API

thizsam commented 3 years ago

Error DevTools listening on ws://127.0.0.1:49797/devtools/browser/e0a05810-7483-48d5-9c4a-425827492c6a NoSuchElementError: no such element: Unable to locate element: {"method":"css selector","selector":"*[name="email"]"} (Session info: chrome=90.0.4430.212)

Already tried await driver.findElement(By.name('email')).sendKeys(email);