Please let this be the fnal update
This commit is contained in:
parent
f347dd180d
commit
c5baf912fd
19
V4.py
19
V4.py
|
@ -402,7 +402,7 @@ def login() :
|
||||||
mail.send_keys(Keys.ENTER)
|
mail.send_keys(Keys.ENTER)
|
||||||
CustomSleep(5
|
CustomSleep(5
|
||||||
)
|
)
|
||||||
"""
|
""" no issues for now, delete in a few real updates
|
||||||
try :
|
try :
|
||||||
driver.find_element(By.ID, 'idChkBx_PWD_KMSI0Pwd').click()
|
driver.find_element(By.ID, 'idChkBx_PWD_KMSI0Pwd').click()
|
||||||
except :
|
except :
|
||||||
|
@ -580,31 +580,30 @@ def TryPlay(nom ="inconnu"):
|
||||||
def play(number, override = None) :
|
def play(number, override = None) :
|
||||||
if number == 8 or number == 9 :
|
if number == 8 or number == 9 :
|
||||||
try :
|
try :
|
||||||
printf(f'Quiz 8 détécté sur la page {nom}')
|
printf(f'\033[96m Quiz 8 détécté sur la page {nom} \033[0m')
|
||||||
PlayQuiz8()
|
PlayQuiz8()
|
||||||
printf(f'Quiz 8 reussit sur {nom}')
|
printf(f'\033[92m Quiz 8 reussit sur {nom} \033[0m')
|
||||||
except Exception as e :
|
except Exception as e :
|
||||||
printf(f'echec de PlayQuiz 8. Aborted {e}')
|
printf(f'echec de PlayQuiz 8. Aborted {e} \033[0m')
|
||||||
|
|
||||||
elif number == 5 or number == 4 :
|
elif number == 5 or number == 4 :
|
||||||
try :
|
try :
|
||||||
printf(f'Quiz 4 détécté sur la page {nom}')
|
printf(f'\033[96m Quiz 4 détécté sur la page {nom} \033[0m')
|
||||||
PlayQuiz4()
|
PlayQuiz4()
|
||||||
print(f'Quiz 4 reussit sur {nom}')
|
print(f'\033[92m Quiz 4 reussit sur {nom} \033[0m')
|
||||||
except Exception as e :
|
except Exception as e :
|
||||||
printf(f'echec de PlayQuiz 4. Aborted {e}')
|
printf(f'echec de PlayQuiz 4. Aborted {e} \033[0m')
|
||||||
|
|
||||||
elif number == 3 or number == 2 :
|
elif number == 3 or number == 2 :
|
||||||
try :
|
try :
|
||||||
printf(f'Quiz 2 détécté sur la page {nom}')
|
printf(f'\033[96m Quiz 2 détécté sur la page {nom}\033[0m')
|
||||||
PlayQuiz2()
|
PlayQuiz2()
|
||||||
print(f'Quiz 2 reussit sur la page {nom}')
|
print(f'\033[92m Quiz 2 reussit sur la page {nom}\033[0m')
|
||||||
except Exception as e :
|
except Exception as e :
|
||||||
printf(f'echec de PlayQuiz 2. Aborted {e}')
|
printf(f'echec de PlayQuiz 2. Aborted {e}')
|
||||||
else :
|
else :
|
||||||
LogError('probleme dans la carte : il y a un bouton play et aucun quiz detecté')
|
LogError('probleme dans la carte : il y a un bouton play et aucun quiz detecté')
|
||||||
try :
|
try :
|
||||||
LogError('value="Commencez à jouer !"')
|
|
||||||
driver.find_element(By.ID, 'rqStartQuiz').click() #start the quiz
|
driver.find_element(By.ID, 'rqStartQuiz').click() #start the quiz
|
||||||
number = driver.page_source.count('rqAnswerOption')
|
number = driver.page_source.count('rqAnswerOption')
|
||||||
play(number)
|
play(number)
|
||||||
|
|
Loading…
Reference in New Issue