update mobile login

This commit is contained in:
piair 2022-05-27 09:28:31 +02:00
parent 13ab9b1acf
commit 365df0abcd

13
V4.py
View File

@ -278,9 +278,7 @@ def Close(fenetre, SwitchTo=0):
driver.switch_to.window(driver.window_handles[SwitchTo]) driver.switch_to.window(driver.window_handles[SwitchTo])
""" #Deal with RGPD popup as well as some random popup like 'are you satisfied' one
Deal with RGPD popup as well as some random popup like 'are you satisfied' one
"""
def RGPD(): def RGPD():
try: try:
driver.find_element(By.ID, "bnp_btn_accept").click() driver.find_element(By.ID, "bnp_btn_accept").click()
@ -634,6 +632,7 @@ def BingMobileSearch(override=randint(22, 25)):
) )
CustomSleep(uniform(3, 5)) CustomSleep(uniform(3, 5))
printf("debut du login", Mobdriver=MobileDriver) printf("debut du login", Mobdriver=MobileDriver)
MRGPD()
MobileDriver.find_element(By.ID, "mHamburger").click() MobileDriver.find_element(By.ID, "mHamburger").click()
CustomSleep(uniform(1, 2)) CustomSleep(uniform(1, 2))
printf("login - 1", Mobdriver=MobileDriver) printf("login - 1", Mobdriver=MobileDriver)
@ -673,11 +672,15 @@ def BingMobileSearch(override=randint(22, 25)):
try: try:
MobileDriver.find_element(By.ID, "bnp_btn_accept").click() MobileDriver.find_element(By.ID, "bnp_btn_accept").click()
except Exception as e: except Exception as e:
printf(e) printf(f"MRGPD , pas grave, {e}")
try: try:
MobileDriver.find_element(By.ID, "bnp_hfly_cta2").click() MobileDriver.find_element(By.ID, "bnp_hfly_cta2").click()
except Exception as e: except Exception as e:
printf(e) printf(f"MRGPD , pas grave, {e}")
try:
MobileDriver.find_element(By.ID, "dismissNotification").click()
except Exception as e:
printf(f"MRGPD , pas grave, {e}")
def Alerte(): def Alerte():
try: try: