issue indeed fixed, but still can't log in

This commit is contained in:
piair 2024-02-27 16:05:21 +01:00
parent 476f99b931
commit b072041446
3 changed files with 3 additions and 6 deletions

5
V6.py
View File

@ -362,9 +362,6 @@ def try_play(nom="inconnu"):
def login_part_1(): def login_part_1():
info("Starting part 1 of login") info("Starting part 1 of login")
driver = config.WebDriver.driver driver = config.WebDriver.driver
input("Press enter to continue")
driver.get("https://piair.dev")
input("Press enter to continue")
driver.get("https://login.live.com") driver.get("https://login.live.com")
wait_until_visible(By.ID, "i0116", browser=driver) wait_until_visible(By.ID, "i0116", browser=driver)
mail_elem = driver.find_element(By.ID, "i0116") mail_elem = driver.find_element(By.ID, "i0116")
@ -408,7 +405,7 @@ def login_part_2():
try: try:
driver.find_element(By.ID, elm_id).click() driver.find_element(By.ID, elm_id).click()
except Exception as e: except Exception as e:
pass debug(e)
wait_until_visible(By.CSS_SELECTOR, '[data-bi-id="sh-sharedshell-home"]', 20, driver) wait_until_visible(By.CSS_SELECTOR, '[data-bi-id="sh-sharedshell-home"]', 20, driver)

View File

@ -30,7 +30,7 @@ class ColoredFormatter(logging.Formatter):
# Set up the root logger # Set up the root logger
root_logger = logging.getLogger() root_logger = logging.getLogger()
root_logger.setLevel(logging.INFO) root_logger.setLevel(logging.DEBUG)
# Create a console handler and set the formatter # Create a console handler and set the formatter
ch = logging.StreamHandler() ch = logging.StreamHandler()

View File

@ -67,5 +67,5 @@ def wait_until_visible(search_by: str, identifier: str, timeout: int = 20, brows
expected_conditions.visibility_of_element_located((search_by, identifier)), "element not found") expected_conditions.visibility_of_element_located((search_by, identifier)), "element not found")
return True return True
except TimeoutException as e: except TimeoutException as e:
printf(f"element {identifier} not found after {timeout}s") error(f"element {identifier} not found after {timeout}s")
return False return False