diff --git a/handlers/gewobag_handler.py b/handlers/gewobag_handler.py index 44c2d15..b48bfe6 100644 --- a/handlers/gewobag_handler.py +++ b/handlers/gewobag_handler.py @@ -215,9 +215,9 @@ class GewobagHandler(BaseHandler): try: mobile_phone = os.environ.get("FORM_PHONE", "") if mobile_phone: - # Wait for the field to appear - await iframe_page.wait_for_selector('#formly_17_input_$$_telephone_number_$$_0', timeout=5000, state='visible') - mobile_input = await iframe_page.query_selector('#formly_17_input_$$_telephone_number_$$_0') + # Wait for the field to appear - need to escape $$ in the selector + await iframe_page.wait_for_selector('#formly_17_input_\\$\\$_telephone_number_\\$\\$_0', timeout=5000, state='visible') + mobile_input = await iframe_page.query_selector('#formly_17_input_\\$\\$_telephone_number_\\$\\$_0') if mobile_input: await mobile_input.scroll_into_view_if_needed() await mobile_input.fill(mobile_phone)