From ee741f4570050f559395e687da64c64ff9046afb Mon Sep 17 00:00:00 2001 From: Amaury <1293565+amaury1729@users.noreply.github.com> Date: Tue, 5 Dec 2023 12:20:33 +0100 Subject: [PATCH] fix(core): More robust Hotmail invalid check --- core/src/smtp/outlook/headless.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/core/src/smtp/outlook/headless.rs b/core/src/smtp/outlook/headless.rs index 92bed7092..1011ee412 100644 --- a/core/src/smtp/outlook/headless.rs +++ b/core/src/smtp/outlook/headless.rs @@ -67,18 +67,23 @@ pub async fn check_password_recovery( .wait() .for_element(Locator::Id("pMemberNameErr")) .and_then(|_| async { Ok(false) }); - // "We need to verify your identity" means that the account exists. + // "Try entering your Microsoft account again. We don't recognise this one." let f2 = c + .wait() + .for_element(Locator::Id("iSigninNameError")) + .and_then(|_| async { Ok(false) }); + // "We need to verify your identity" means that the account exists. + let f3 = c .wait() .for_element(Locator::Id("iSelectProofTitle")) .and_then(|_| async { Ok(true) }); // "Enter the code generated by your authenticator app..." - let f3 = c + let f4 = c .wait() .for_element(Locator::Id("iEnterVerification")) .and_then(|_| async { Ok(true) }); - let is_deliverable = f1.try_race(f2).try_race(f3).await?; + let is_deliverable = f1.try_race(f2).try_race(f3).try_race(f4).await?; if is_deliverable { log::debug!(