fix: retry continue/submit on epic password and otp steps
This commit is contained in:
parent
ec69bf1a0c
commit
728d08e551
1 changed files with 6 additions and 2 deletions
|
|
@ -140,7 +140,9 @@ const ensureLoggedIn = async (page, context) => {
|
||||||
await passwordField.fill(cfg.eg_password);
|
await passwordField.fill(cfg.eg_password);
|
||||||
const rememberMe = page.locator('input[name="rememberMe"], #rememberMe');
|
const rememberMe = page.locator('input[name="rememberMe"], #rememberMe');
|
||||||
if (await rememberMe.count()) await rememberMe.check().catch(() => {});
|
if (await rememberMe.count()) await rememberMe.check().catch(() => {});
|
||||||
await page.click('button[type="submit"]');
|
await continueBtn.first().click().catch(async () => {
|
||||||
|
await page.click('button[type="submit"]').catch(() => {});
|
||||||
|
});
|
||||||
|
|
||||||
// MFA step
|
// MFA step
|
||||||
try {
|
try {
|
||||||
|
|
@ -156,7 +158,9 @@ const ensureLoggedIn = async (page, context) => {
|
||||||
} else {
|
} else {
|
||||||
await page.locator('input[name="code-input-0"]').pressSequentially(otp.toString());
|
await page.locator('input[name="code-input-0"]').pressSequentially(otp.toString());
|
||||||
}
|
}
|
||||||
await page.click('button[type="submit"]');
|
await continueBtn.first().click().catch(async () => {
|
||||||
|
await page.click('button[type="submit"]').catch(() => {});
|
||||||
|
});
|
||||||
} catch {
|
} catch {
|
||||||
// no MFA
|
// no MFA
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue