Compare commits
1
Commits
c87ab6c6aa
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4661c30c9f |
@@ -231,6 +231,19 @@ class AutomationUnitedSCOPreAuthCheck(AutomationUnitedSCOEligibilityCheck):
|
||||
pass
|
||||
time.sleep(2) # let the procedure section finish rendering
|
||||
|
||||
# The row/heading status is only "Processed"; the decision is each procedure's
|
||||
# "Determination Status" (Approved/Denied). Any approved line -> Approved, else Denied.
|
||||
try:
|
||||
body_text = self.driver.find_element(By.TAG_NAME, "body").text
|
||||
determinations = [d.lower() for d in re.findall(r"Determination Status\s+([A-Za-z]+)", body_text)]
|
||||
print(f"[UnitedSCO PreAuthCheck step2] Determination statuses: {determinations}")
|
||||
if any(d.startswith("approv") for d in determinations):
|
||||
status = "Approved"
|
||||
elif any(d.startswith("deni") or d.startswith("reject") for d in determinations):
|
||||
status = "Denied"
|
||||
except Exception as e:
|
||||
print(f"[UnitedSCO PreAuthCheck step2] Reading determination status failed: {e}")
|
||||
|
||||
# 4) Save the page as a PDF (the Print button opens Chrome's dialog, which Selenium can't drive)
|
||||
pdf = self.driver.execute_cdp_cmd("Page.printToPDF", {
|
||||
"printBackground": True,
|
||||
|
||||
Reference in New Issue
Block a user