Skip to content

Commit

Permalink
Fix for issue found in #89
Browse files Browse the repository at this point in the history
Signed-off-by: LuXeZs <49080760+LuXeZs@users.noreply.github.com>
  • Loading branch information
Luminaex authored Nov 22, 2023
1 parent 0b412fa commit 17e8507
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.wait import WebDriverWait

def bootstrap_browser(
configuration: dict,
Expand Down Expand Up @@ -104,7 +106,7 @@ def bootstrap_login_page(

case 'backup':
driver.find_element(By.XPATH, "//*[@id='app-mount']/div[2]/div[1]/div[1]/div/div/div/section/div[2]/div/div/form/div[3]/button[1]").click() # These will need to be cleaned up at some point but they work
driver.implicitly_wait(1)
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "//*[@id='app-mount']/div[2]/div[1]/div[1]/div/div/div/section/div[2]/div/div/div[2]/div[2]"))) # Waits until element is clickable
driver.find_element(By.XPATH, "//*[@id='app-mount']/div[2]/div[1]/div[1]/div/div/div/section/div[2]/div/div/div[2]/div[2]").click() # These will need to be cleaned up at some point but they work
driver.implicitly_wait(1)
login_fields['TOTP'] = driver.find_element(by=By.XPATH, value="//input[@placeholder='8-digit backup code']")
Expand Down Expand Up @@ -253,4 +255,4 @@ def print_session_statistics(
print(color(f"Code mode: { session_statistics['codeMode']}", 'blue'))
print(color(f"Number of tried codes: {session_statistics['attemptedCodeCount']}", 'blue'))
print(color(f"Time elapsed for codes: { session_statistics['elapsedTime']}", 'blue'))
print(color(f"Number of ratelimits { session_statistics['ratelimitCount']}", 'blue'))
print(color(f"Number of ratelimits { session_statistics['ratelimitCount']}", 'blue'))

0 comments on commit 17e8507

Please sign in to comment.