MCPcopy
hub / github.com/reflex-dev/reflex / driver

Function driver

tests/integration/test_extra_overlay_function.py:50–70  ·  view source on GitHub ↗

Get an instance of the browser open to the extra overlay app. Args: extra_overlay: harness for the ExtraOverlay app. Yields: WebDriver instance.

(extra_overlay: AppHarness)

Source from the content-addressed store, hash-verified

48
49@pytest.fixture
50def driver(extra_overlay: AppHarness):
51 """Get an instance of the browser open to the extra overlay app.
52
53 Args:
54 extra_overlay: harness for the ExtraOverlay app.
55
56 Yields:
57 WebDriver instance.
58 """
59 driver = extra_overlay.frontend()
60 try:
61 token_input = AppHarness.poll_for_or_raise_timeout(
62 lambda: driver.find_element(By.ID, "token")
63 )
64 # wait for the backend connection to send the token
65 token = extra_overlay.poll_for_value(token_input)
66 assert token is not None
67
68 yield driver
69 finally:
70 driver.quit()
71
72
73def test_extra_overlay(driver: WebDriver, extra_overlay: AppHarness):

Callers

nothing calls this directly

Calls 3

frontendMethod · 0.80
poll_for_valueMethod · 0.80

Tested by

no test coverage detected