eg: fix page.type: text: expected string, got number
This commit is contained in:
parent
e931892b76
commit
746d226cf6
1 changed files with 1 additions and 1 deletions
|
|
@ -83,7 +83,7 @@ try {
|
||||||
await page.waitForNavigation({ url: '**/id/login/mfa**'}).then(async () => {
|
await page.waitForNavigation({ url: '**/id/login/mfa**'}).then(async () => {
|
||||||
console.log('Enter the security code to continue - This appears to be a new device, browser or location. A security code has been sent to your email address at ...');
|
console.log('Enter the security code to continue - This appears to be a new device, browser or location. A security code has been sent to your email address at ...');
|
||||||
const otp = await prompt({type: 'number', message: 'Enter two-factor sign in code', validate: n => n.toString().length == 6 || 'The code must be 6 digits!'});
|
const otp = await prompt({type: 'number', message: 'Enter two-factor sign in code', validate: n => n.toString().length == 6 || 'The code must be 6 digits!'});
|
||||||
await page.type('input[name="code-input-0"]', otp);
|
await page.type('input[name="code-input-0"]', otp.toString());
|
||||||
await page.click('button[type="submit"]');
|
await page.click('button[type="submit"]');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue