wbs mit wohnbedarf
This commit is contained in:
parent
92912e8487
commit
0d1de13420
1 changed files with 11 additions and 5 deletions
|
|
@ -230,12 +230,13 @@ class GewobagHandler(BaseHandler):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning(f"[GEWOBAG] Could not fill Mobilfunknummer: {e}")
|
logger.warning(f"[GEWOBAG] Could not fill Mobilfunknummer: {e}")
|
||||||
|
|
||||||
# WBS (Wohnberechtigungsschein) - Click "Ja" radio button
|
# WBS (Wohnberechtigungsschein) - Handle both regular and special needs WBS
|
||||||
try:
|
try:
|
||||||
|
# Check for regular WBS first (click Ja)
|
||||||
wbs_ja = await iframe_page.query_selector('input[type="radio"][id*="wbs_available"][id*="-Ja"]')
|
wbs_ja = await iframe_page.query_selector('input[type="radio"][id*="wbs_available"][id*="-Ja"]')
|
||||||
if wbs_ja:
|
if wbs_ja:
|
||||||
await wbs_ja.click()
|
await wbs_ja.click()
|
||||||
logger.info("[GEWOBAG] Selected WBS: Ja")
|
logger.info("[GEWOBAG] Selected regular WBS: Ja")
|
||||||
await asyncio.sleep(1) # Wait for conditional WBS fields to appear
|
await asyncio.sleep(1) # Wait for conditional WBS fields to appear
|
||||||
|
|
||||||
# Save debug HTML after WBS fields are visible
|
# Save debug HTML after WBS fields are visible
|
||||||
|
|
@ -249,10 +250,15 @@ class GewobagHandler(BaseHandler):
|
||||||
logger.warning(f"[GEWOBAG] Could not save WBS debug HTML: {e}")
|
logger.warning(f"[GEWOBAG] Could not save WBS debug HTML: {e}")
|
||||||
|
|
||||||
form_filled = True
|
form_filled = True
|
||||||
except Exception as e:
|
|
||||||
logger.warning(f"[GEWOBAG] Could not select WBS: {e}")
|
|
||||||
|
|
||||||
# WBS Gültigkeit (validity date) - appears after selecting Ja
|
# Check for special needs WBS (click Nein - we don't have this)
|
||||||
|
wbs_special_nein = await iframe_page.query_selector('input[type="radio"][id*="wbs_mit_besonderem_wohnbedarf"][id*="-Nein"]')
|
||||||
|
if wbs_special_nein:
|
||||||
|
await wbs_special_nein.click()
|
||||||
|
logger.info("[GEWOBAG] Selected WBS mit besonderem Wohnbedarf: Nein")
|
||||||
|
form_filled = True
|
||||||
|
except Exception as e:
|
||||||
|
logger.warning(f"[GEWOBAG] Could not select WBS: {e}") # WBS Gültigkeit (validity date) - appears after selecting Ja
|
||||||
try:
|
try:
|
||||||
wbs_valid_until = os.environ.get("FORM_WBS_VALID_UNTIL", "26.11.2026")
|
wbs_valid_until = os.environ.get("FORM_WBS_VALID_UNTIL", "26.11.2026")
|
||||||
wbs_date_input = await iframe_page.query_selector('#formly_6_input_\\$\\$_wbs_valid_until_\\$\\$_0')
|
wbs_date_input = await iframe_page.query_selector('#formly_6_input_\\$\\$_wbs_valid_until_\\$\\$_0')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue