fix: complete United Ucard claim flow and remember OTP device
- Click the first visible 'Next' button on the Patient Information step instead of a stale hidden one, so the wizard advances after member select - Read procedure fee from totalBilled/billedAmount (matching every other claim worker) instead of a fee key the frontend never sends - Implement claim confirmation PDF capture + claim number extraction - Check "Remember this device" on the OTP page so future logins skip OTP Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -179,6 +179,22 @@ async def start_uniteducard_run(sid: str, data: dict, url: str):
|
||||
)
|
||||
otp_input.clear()
|
||||
otp_input.send_keys(otp_value)
|
||||
|
||||
# Check "Remember this device" so future logins skip OTP.
|
||||
# Confirmed against live site (2026-09-15):
|
||||
# <span role="checkbox" data-cy="data-checkbox-rememberDevice"
|
||||
# aria-checked="false" ...>
|
||||
try:
|
||||
remember_checkbox = driver.find_element(By.CSS_SELECTOR,
|
||||
"[data-cy='data-checkbox-rememberDevice']")
|
||||
if remember_checkbox.get_attribute("aria-checked") != "true":
|
||||
driver.execute_script(
|
||||
"arguments[0].scrollIntoView({block:'center'});", remember_checkbox)
|
||||
remember_checkbox.click()
|
||||
print("[UnitedUcard OTP] Checked 'Remember this device'")
|
||||
except Exception as remember_err:
|
||||
print(f"[UnitedUcard OTP] Could not check 'Remember this device': {remember_err}")
|
||||
|
||||
try:
|
||||
# Try the confirmed id first — the broader text/type
|
||||
# fallback below can match the WRONG button if more
|
||||
|
||||
Reference in New Issue
Block a user