This commit is contained in:
piair 2022-06-10 14:15:42 +02:00
parent a9bd8ecf9b
commit 8f6f2ab5df
1 changed files with 11 additions and 7 deletions

14
V4.py
View File

@ -533,11 +533,8 @@ def login():
try: try:
driver.find_element(By.CSS_SELECTOR, f'[title="Rejoindre"]').click() # depend of the language of the page driver.find_element(By.CSS_SELECTOR, f'[title="Rejoindre"]').click() # depend of the language of the page
except: except:
try :
driver.find_element(By.CSS_SELECTOR, f'[title="Join now"]').click() # depend of the language of the page driver.find_element(By.CSS_SELECTOR, f'[title="Join now"]').click() # depend of the language of the page
except Exception as e:
LogError(f"erreur de login : {e} - probablement deja log ou une langue inconnue")
return(driver.current_window_handle)
CustomSleep(10) CustomSleep(10)
mail = driver.find_element(By.ID, "i0116") mail = driver.find_element(By.ID, "i0116")
@ -553,25 +550,32 @@ def login():
try: try:
driver.find_element(By.ID, "KmsiCheckboxField").click() driver.find_element(By.ID, "KmsiCheckboxField").click()
except Exception as e: except Exception as e:
printf("login - 2.1 ", end = "\r")
pass
printf(f"login - 2.1 - erreur validation bouton KmsiCheckboxField. pas forcement grave {e}") printf(f"login - 2.1 - erreur validation bouton KmsiCheckboxField. pas forcement grave {e}")
try: try:
driver.find_element(By.ID, "iLooksGood").click() driver.find_element(By.ID, "iLooksGood").click()
except Exception as e: except Exception as e:
printf("login - 2.2 ", end = "\r")
pass
printf(f"login - 2.2 - erreur validation bouton iLooksGood. pas forcement grave {e}") printf(f"login - 2.2 - erreur validation bouton iLooksGood. pas forcement grave {e}")
try: try:
driver.find_element(By.ID, "idSIButton9").click() driver.find_element(By.ID, "idSIButton9").click()
except Exception as e: except Exception as e:
printf("login - 2.3 ", end = "\r")
pass
printf(f"login - 2.3 - erreur validation bouton idSIButton9. pas forcement grave {e}") printf(f"login - 2.3 - erreur validation bouton idSIButton9. pas forcement grave {e}")
try: try:
driver.find_element(By.ID, "iCancel").click() driver.find_element(By.ID, "iCancel").click()
except Exception as e: except Exception as e:
printf("login - 2.4 ", end = "\r")
pass
printf(f"login - 2.4 - erreur validation bouton iCancel. pas forcement grave {e}") printf(f"login - 2.4 - erreur validation bouton iCancel. pas forcement grave {e}")
printf("login completed") printf("login completed")
RGPD() RGPD()
driver.get("https://www.bing.com/rewardsapp/flyout") driver.get("https://www.bing.com/rewardsapp/flyout")