def driver(icons: AppHarness):
    """Get an instance of the browser open to the dynamic components app.

    Args:
        icons: AppHarness for the dynamic components

    Yields:
        WebDriver instance.
    """
    driver = icons.frontend()
    try:
        token_input = poll_for_result(
            lambda: driver.find_element(By.ID, "token"), max_attempts=30
        )
        assert token_input
        # wait for the backend connection to send the token
        token = icons.poll_for_value(token_input)
        assert token is not None

        yield driver
    finally:
        driver.quit()
Get an instance of the browser open to the dynamic components app.

    Args:
        icons: AppHarness for the dynamic components

    Yields:
        WebDriver instance.
    
tests/integration/test_icon.py