This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import random | |
from playwright.sync_api import sync_playwright, TimeoutError as PlaywrightTimeoutError | |
def extract_application_id_from_url(url_string): | |
""" | |
Extracts the application ID from a URL string. | |
The ID is expected to be between 'application/' and '/submit-with'. | |
Args: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import random | |
from playwright.sync_api import sync_playwright, TimeoutError as PlaywrightTimeoutError | |
def fill_and_submit_affirm_onboarding(url): | |
print(f"--- Starting Playwright form filling and submission for {url} ---") | |
screenshot_path_fields_filled = "affirm_onboarding_all_fields_filled.png" | |
screenshot_path_after_submit = "affirm_onboarding_after_submit.png" | |
screenshot_path_submit_error = "affirm_onboarding_submit_error.png" # Used for various errors |