fix: wait for table rows before extracting eligibility data; add batch claim PDF download

This commit is contained in:
Gitead
2026-04-30 15:38:29 -04:00
parent d8f852741a
commit 763a322e79
4 changed files with 182 additions and 4 deletions

View File

@@ -180,14 +180,15 @@ class AutomationMassHealthEligibilityCheck:
return ''.join(c for c in str(s) if c.isalnum()).lower()
def _extract_data_from_page(self):
wait = WebDriverWait(self.driver, 5)
wait = WebDriverWait(self.driver, 15)
extracted = {}
try:
# Wait until Eligible or Ineligible header appears
# Wait until at least one table row appears under Eligible or Ineligible
# the h4 header renders before the rows are populated, so we must wait for rows.
wait.until(
EC.presence_of_element_located(
(By.XPATH, "//h4[text()='Eligible' or text()='Ineligible']")
(By.XPATH, "//h4[text()='Eligible' or text()='Ineligible']/following::table[1]/tbody/tr")
)
)