from selenium.common.exceptions import WebDriverException, TimeoutException from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from datetime import datetime import time import os import re import base64 from metlife_browser_manager import get_browser_manager # MetDental provider portal (React SPA, PingOne DaVinci login) METLIFE_BASE_URL = "https://dentalprovider.metlife.com" METLIFE_HOME_URL = f"{METLIFE_BASE_URL}/home" METLIFE_PRESIGNIN_URL = f"{METLIFE_BASE_URL}/presignin" # Home page search form: "Subscriber ID or SSN" (max 11 alphanumeric chars) # The portal's design-system components may put the id on a wrapper instead of the # /