Compare commits
2 Commits
476f99b931
...
40f08b4c86
Author | SHA1 | Date | |
---|---|---|---|
|
40f08b4c86 | ||
|
b072041446 |
5
V6.py
5
V6.py
@ -362,9 +362,6 @@ def try_play(nom="inconnu"):
|
||||
def login_part_1():
|
||||
info("Starting part 1 of login")
|
||||
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")
|
||||
wait_until_visible(By.ID, "i0116", browser=driver)
|
||||
mail_elem = driver.find_element(By.ID, "i0116")
|
||||
@ -408,7 +405,7 @@ def login_part_2():
|
||||
try:
|
||||
driver.find_element(By.ID, elm_id).click()
|
||||
except Exception as e:
|
||||
pass
|
||||
debug(e)
|
||||
|
||||
wait_until_visible(By.CSS_SELECTOR, '[data-bi-id="sh-sharedshell-home"]', 20, driver)
|
||||
|
||||
|
@ -30,7 +30,7 @@ class ColoredFormatter(logging.Formatter):
|
||||
|
||||
# Set up the root logger
|
||||
root_logger = logging.getLogger()
|
||||
root_logger.setLevel(logging.INFO)
|
||||
root_logger.setLevel(logging.DEBUG)
|
||||
|
||||
# Create a console handler and set the formatter
|
||||
ch = logging.StreamHandler()
|
||||
|
@ -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")
|
||||
return True
|
||||
except TimeoutException as e:
|
||||
printf(f"element {identifier} not found after {timeout}s")
|
||||
error(f"element {identifier} not found after {timeout}s")
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user