fix: retry continue/submit on epic password and otp steps

This commit is contained in:
nocci 2025-12-31 13:33:49 +00:00
parent ec69bf1a0c
commit 728d08e551

View file

@ -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
} }