feat: add Selenium Settings page to configure paymentGroupId per office

Adds a new Settings → Advanced → Selenium Settings page where the office
name (paymentGroupId) used in United/DentalHub portal dropdowns can be
configured without touching code. Previously hardcoded as "Summit Dental
Care"; now injected from DB into the three United workers at job dispatch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-02 23:53:43 -04:00
parent abb2a0ac96
commit 75ecd7cc20
998 changed files with 18415 additions and 283 deletions

View File

@@ -52,6 +52,7 @@ class AutomationUnitedDHClaimSubmit:
self.uniteddh_username = claim.get("uniteddhUsername", "")
self.uniteddh_password = claim.get("uniteddhPassword", "")
self.payment_group_id = claim.get("paymentGroupId", "")
self.download_dir = get_browser_manager().download_dir
os.makedirs(self.download_dir, exist_ok=True)
@@ -595,11 +596,11 @@ class AutomationUnitedDHClaimSubmit:
try:
summit_option = WebDriverWait(self.driver, 5).until(
EC.element_to_be_clickable((By.XPATH,
"//ng-dropdown-panel//div[contains(@class,'ng-option') and contains(.,'Summit Dental Care')]"
f"//ng-dropdown-panel//div[contains(@class,'ng-option') and contains(.,'{self.payment_group_id}')]"
))
)
summit_option.click()
print("[UnitedDH Claim] step1: Selected Treatment Location: Summit Dental Care")
print(f"[UnitedDH Claim] step1: Selected Treatment Location: {self.payment_group_id}")
location_selected = True
except TimeoutException:
try:
@@ -632,11 +633,11 @@ class AutomationUnitedDHClaimSubmit:
try:
summit_option = WebDriverWait(self.driver, 5).until(
EC.element_to_be_clickable((By.XPATH,
"//ng-dropdown-panel//div[contains(@class,'ng-option') and contains(.,'Summit Dental Care')]"
f"//ng-dropdown-panel//div[contains(@class,'ng-option') and contains(.,'{self.payment_group_id}')]"
))
)
summit_option.click()
print("[UnitedDH Claim] step1: Selected Billing Entity: Summit Dental Care")
print(f"[UnitedDH Claim] step1: Selected Billing Entity: {self.payment_group_id}")
billing_selected = True
except TimeoutException:
try:

View File

@@ -52,6 +52,7 @@ class AutomationUnitedDHPreAuth:
self.uniteddh_username = claim.get("uniteddhUsername", "")
self.uniteddh_password = claim.get("uniteddhPassword", "")
self.payment_group_id = claim.get("paymentGroupId", "")
self.download_dir = get_browser_manager().download_dir
os.makedirs(self.download_dir, exist_ok=True)
@@ -554,11 +555,11 @@ class AutomationUnitedDHPreAuth:
try:
summit_option = WebDriverWait(self.driver, 5).until(
EC.element_to_be_clickable((By.XPATH,
"//ng-dropdown-panel//div[contains(@class,'ng-option') and contains(.,'Summit Dental Care')]"
f"//ng-dropdown-panel//div[contains(@class,'ng-option') and contains(.,'{self.payment_group_id}')]"
))
)
summit_option.click()
print("[UnitedDH PreAuth] step1: Selected Treatment Location: Summit Dental Care")
print(f"[UnitedDH PreAuth] step1: Selected Treatment Location: {self.payment_group_id}")
location_selected = True
except TimeoutException:
try:
@@ -590,11 +591,11 @@ class AutomationUnitedDHPreAuth:
try:
summit_option = WebDriverWait(self.driver, 5).until(
EC.element_to_be_clickable((By.XPATH,
"//ng-dropdown-panel//div[contains(@class,'ng-option') and contains(.,'Summit Dental Care')]"
f"//ng-dropdown-panel//div[contains(@class,'ng-option') and contains(.,'{self.payment_group_id}')]"
))
)
summit_option.click()
print("[UnitedDH PreAuth] step1: Selected Billing Entity: Summit Dental Care")
print(f"[UnitedDH PreAuth] step1: Selected Billing Entity: {self.payment_group_id}")
billing_selected = True
except TimeoutException:
try:

View File

@@ -27,6 +27,7 @@ class AutomationUnitedSCOEligibilityCheck:
self.lastName = self.data.get("lastName", "")
self.unitedsco_username = self.data.get("unitedscoUsername", "")
self.unitedsco_password = self.data.get("unitedscoPassword", "")
self.payment_group_id = self.data.get("paymentGroupId", "")
# Use browser manager's download dir
self.download_dir = get_browser_manager().download_dir
@@ -653,11 +654,11 @@ class AutomationUnitedSCOEligibilityCheck:
try:
summit_option = WebDriverWait(self.driver, 5).until(
EC.element_to_be_clickable((By.XPATH,
"//ng-dropdown-panel//div[contains(@class,'ng-option') and contains(.,'Summit Dental Care')]"
f"//ng-dropdown-panel//div[contains(@class,'ng-option') and contains(.,'{self.payment_group_id}')]"
))
)
summit_option.click()
print("[UnitedSCO step1] Selected Treatment Location: Summit Dental Care")
print(f"[UnitedSCO step1] Selected Treatment Location: {self.payment_group_id}")
location_selected = True
except TimeoutException:
try:
@@ -691,11 +692,11 @@ class AutomationUnitedSCOEligibilityCheck:
try:
summit_option = WebDriverWait(self.driver, 5).until(
EC.element_to_be_clickable((By.XPATH,
"//ng-dropdown-panel//div[contains(@class,'ng-option') and contains(.,'Summit Dental Care')]"
f"//ng-dropdown-panel//div[contains(@class,'ng-option') and contains(.,'{self.payment_group_id}')]"
))
)
summit_option.click()
print("[UnitedSCO step1] Selected Billing Entity: Summit Dental Care")
print(f"[UnitedSCO step1] Selected Billing Entity: {self.payment_group_id}")
billing_selected = True
except TimeoutException:
try: