fix: wait for table rows before extracting eligibility data; add batch claim PDF download
This commit is contained in:
@@ -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")
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user