Compare commits

..

No commits in common. "40f08b4c86963cdf2128cbb1381d5c03e92670dd" and "476f99b9315162c6ee9a221855f2d6d95f0a506b" have entirely different histories.

4 changed files with 7 additions and 4 deletions

5
V6.py
View File

@ -362,6 +362,9 @@ 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")
@ -405,7 +408,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:
debug(e) pass
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.DEBUG) root_logger.setLevel(logging.INFO)
# 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:
error(f"element {identifier} not found after {timeout}s") printf(f"element {identifier} not found after {timeout}s")
return False return False

View File

@ -1 +1 @@
v6.8.16 v6.8.15