Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions roadtx/roadtools/roadtx/selenium.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,15 @@ def selenium_login(self, url, identity=None, password=None, otpseed=None, keep=F
els = WebDriverWait(driver, 6000).until(lambda d: d.find_element(By.ID, "i0118"))
els.send_keys(Keys.ENTER)

# In case "Are you trying to sign in to MS authentication broker" page is shown immediately, click continue
try:
els = WebDriverWait(driver, 1).until(lambda d: d.find_element(By.ID, "idSIButton9"))
# Prevents attempting to click on disabled button, e.g. if account selection page is shown
if els.get_attribute("style") != "display: none;":
els.click()
except TimeoutException:
pass

# Quick check of mfa not needed
try:
try:
Expand Down