juzjus10 / Epic-Account-Creator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Suggestion

Bafmaaan opened this issue · comments

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

commented

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);

Alternatively you can hook into a password manager API

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);