feat: add Delta Dental Individual (DeltaIndiv) eligibility check flow; fix CCA eligibility false-positive error
CCA step1 was treating the harmless "password set to expire" banner as a fatal error, closing the browser before the eligibility popup/report could be captured. Now it short-circuits to success once the patient popup renders and ignores password-expiration notices. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -466,13 +466,22 @@ class AutomationCCAEligibilityCheck:
|
||||
if "no results" in body_text.lower() or "not found" in body_text.lower() or "no patient" in body_text.lower():
|
||||
return "ERROR: No patient found with the provided Subscriber ID and DOB"
|
||||
|
||||
# Patient popup already rendered — this is a success regardless of any
|
||||
# unrelated banner (e.g. a password-expiration notice) also on the page.
|
||||
if "patient selected" in body_text.lower() or "patient information" in body_text.lower():
|
||||
return "SUCCESS"
|
||||
|
||||
# Check for error alerts
|
||||
try:
|
||||
alerts = self.driver.find_elements(By.XPATH,
|
||||
"//*[@role='alert'] | //*[contains(@class,'alert-danger')]")
|
||||
for alert in alerts:
|
||||
if alert.is_displayed() and alert.text.strip():
|
||||
return f"ERROR: {alert.text.strip()[:200]}"
|
||||
alert_text = alert.text.strip()
|
||||
if not alert.is_displayed() or not alert_text:
|
||||
continue
|
||||
if "password" in alert_text.lower() and "expire" in alert_text.lower():
|
||||
continue
|
||||
return f"ERROR: {alert_text[:200]}"
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user