Handle Streak-Protection Popup #12
6
V6.py
6
V6.py
@ -226,11 +226,13 @@ def all_cards():
|
|||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
streak_protection_close = driver.find_element(By.ID, "streak-protection-popup-close-cross")
|
streak_protection_close = driver.find_element(By.ID, "streak-protection-popup-close-cross")
|
||||||
streak_protection_close.click()
|
streak_protection_activate = driver.find_elements(By.CLASS_NAME, "earningPagePopUpPopUpSelectButton")
|
||||||
|
streak_protection_activate[0].click()
|
||||||
|
info("Popup 'Streak Protection' reçue")
|
||||||
custom_sleep(1.5)
|
custom_sleep(1.5)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
except exceptions.NoSuchElementException:
|
except (exceptions.NoSuchElementException, IndexError):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
driver.get("https://rewards.bing.com")
|
driver.get("https://rewards.bing.com")
|
||||||
|
Loading…
Reference in New Issue
Block a user