From 31b4d5d7daecf3134a1d2f80551c8036e250f83b Mon Sep 17 00:00:00 2001 From: augustin64 Date: Mon, 8 Jul 2024 10:00:28 +0200 Subject: [PATCH] Actualiser V6.py --- V6.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/V6.py b/V6.py index c8e1f09..2bf3ddb 100755 --- a/V6.py +++ b/V6.py @@ -511,11 +511,15 @@ def login_part_1(): info("Starting part 1 of login") driver = config.WebDriver.driver driver.get("https://login.live.com") - wait_until_visible(By.ID, "i0116", browser=driver) - send_wait_and_confirm( - driver.find_element(By.ID, "i0116"), - config.UserCredentials.get_mail() - ) + try: + wait_until_visible(By.ID, "i0116", browser=driver) + send_wait_and_confirm( + driver.find_element(By.ID, "i0116"), + config.UserCredentials.get_mail() + ) + except exceptions.NoSuchElementException: + info("Unable to find mail input for login, might be semi-logged-in") + wait_until_visible(By.ID, "i0118", browser=driver) send_wait_and_confirm( driver.find_element(By.ID, "i0118"),