update
This commit is contained in:
parent
ec50428c12
commit
9bb22a1837
11
V4.py
11
V4.py
@ -102,7 +102,6 @@ def FirefoxPC(Headless = Headless):
|
|||||||
|
|
||||||
def printf(txt, end="", Mobdriver = None):
|
def printf(txt, end="", Mobdriver = None):
|
||||||
if Log :
|
if Log :
|
||||||
print(txt, end=end)
|
|
||||||
Timer(txt)
|
Timer(txt)
|
||||||
if FullLog :
|
if FullLog :
|
||||||
LogError(txt, Mobdriver=Mobdriver)
|
LogError(txt, Mobdriver=Mobdriver)
|
||||||
@ -233,6 +232,7 @@ def PlayQuiz2(override):
|
|||||||
break
|
break
|
||||||
printf("PlayQuiz2 finis")
|
printf("PlayQuiz2 finis")
|
||||||
|
|
||||||
|
|
||||||
def PlayQuiz8(override = 3):
|
def PlayQuiz8(override = 3):
|
||||||
printf(f"PlayQuiz8 : start, override : {override}")
|
printf(f"PlayQuiz8 : start, override : {override}")
|
||||||
try :
|
try :
|
||||||
@ -271,6 +271,7 @@ def PlayQuiz8(override = 3):
|
|||||||
LogError("PlayQuiz8 - 4 - " + str(e) + str(ListeOfGood))
|
LogError("PlayQuiz8 - 4 - " + str(e) + str(ListeOfGood))
|
||||||
printf("PlayQuiz8 : fin ")
|
printf("PlayQuiz8 : fin ")
|
||||||
|
|
||||||
|
|
||||||
def PlayQuiz4(override = None):
|
def PlayQuiz4(override = None):
|
||||||
printf("PlayQuiz4 : start")
|
printf("PlayQuiz4 : start")
|
||||||
if not override :
|
if not override :
|
||||||
@ -300,6 +301,7 @@ def PlayQuiz4(override = None):
|
|||||||
raise ValueError(e)
|
raise ValueError(e)
|
||||||
printf("PlayQuiz4 : end")
|
printf("PlayQuiz4 : end")
|
||||||
|
|
||||||
|
|
||||||
def PlayPoll():
|
def PlayPoll():
|
||||||
printf("PlayPoll : start")
|
printf("PlayPoll : start")
|
||||||
try :
|
try :
|
||||||
@ -314,6 +316,7 @@ def PlayPoll():
|
|||||||
raise ValueError(e)
|
raise ValueError(e)
|
||||||
printf("PlayPoll : end")
|
printf("PlayPoll : end")
|
||||||
|
|
||||||
|
|
||||||
def AllCard(): #fonction qui clique sur les cartes
|
def AllCard(): #fonction qui clique sur les cartes
|
||||||
|
|
||||||
def reset(Partie2=False): #retourne sur la page de depart apres avoir finis
|
def reset(Partie2=False): #retourne sur la page de depart apres avoir finis
|
||||||
@ -342,7 +345,7 @@ def AllCard(): #fonction qui clique sur les cartes
|
|||||||
reset()
|
reset()
|
||||||
print(f"DailyCard {titre} ok ")
|
print(f"DailyCard {titre} ok ")
|
||||||
except Exception as e :
|
except Exception as e :
|
||||||
printf(f"Allcard card {i+1} error ({titre})")
|
printf(f"Allcard card {titre} error ({e})")
|
||||||
except Exception as e :
|
except Exception as e :
|
||||||
LogError(f'Dailycards {e}')
|
LogError(f'Dailycards {e}')
|
||||||
|
|
||||||
@ -397,7 +400,7 @@ def login() :
|
|||||||
mail = driver.find_element(By.ID, 'i0116')
|
mail = driver.find_element(By.ID, 'i0116')
|
||||||
send_keys_wait(mail, _mail)
|
send_keys_wait(mail, _mail)
|
||||||
mail.send_keys(Keys.ENTER)
|
mail.send_keys(Keys.ENTER)
|
||||||
|
"""
|
||||||
try :
|
try :
|
||||||
driver.find_element(By.ID, 'idChkBx_PWD_KMSI0Pwd').click()
|
driver.find_element(By.ID, 'idChkBx_PWD_KMSI0Pwd').click()
|
||||||
except :
|
except :
|
||||||
@ -406,7 +409,7 @@ def login() :
|
|||||||
driver.find_element(By.CSS_SELECTOR, '''[data-bind="text: str['CT_PWD_STR_KeepMeSignedInCB_Text']"]''').click()
|
driver.find_element(By.CSS_SELECTOR, '''[data-bind="text: str['CT_PWD_STR_KeepMeSignedInCB_Text']"]''').click()
|
||||||
except :
|
except :
|
||||||
printf("a degager 2")
|
printf("a degager 2")
|
||||||
|
"""
|
||||||
pwd = driver.find_element(By.ID, 'i0118')
|
pwd = driver.find_element(By.ID, 'i0118')
|
||||||
send_keys_wait(pwd, _password)
|
send_keys_wait(pwd, _password)
|
||||||
pwd.send_keys(Keys.ENTER)
|
pwd.send_keys(Keys.ENTER)
|
||||||
|
Loading…
Reference in New Issue
Block a user