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

    Args:
        server_side_event: harness for ServerSideEvent app

    Yields:
        WebDriver instance.
    """
    assert server_side_event.app_instance is not None, "app is not running"
    driver = server_side_event.frontend()
    try:
        token_input = driver.find_element(By.ID, "token")
        assert token_input
        # wait for the backend connection to send the token
        token = server_side_event.poll_for_value(token_input)
        assert token is not None

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

    Args:
        server_side_event: harness for ServerSideEvent app

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