MCPcopy Index your code
hub / github.com/reflex-dev/reflex / driver

Function driver

tests/integration/test_icon.py:70–90  ·  view source on GitHub ↗

Get an instance of the browser open to the dynamic components app. Args: icons: AppHarness for the dynamic components Yields: WebDriver instance.

(icons: AppHarness)

Source from the content-addressed store, hash-verified

68
69@pytest.fixture
70def driver(icons: AppHarness):
71 """Get an instance of the browser open to the dynamic components app.
72
73 Args:
74 icons: AppHarness for the dynamic components
75
76 Yields:
77 WebDriver instance.
78 """
79 driver = icons.frontend()
80 try:
81 token_input = AppHarness.poll_for_or_raise_timeout(
82 lambda: driver.find_element(By.ID, "token")
83 )
84 # wait for the backend connection to send the token
85 token = icons.poll_for_value(token_input)
86 assert token is not None
87
88 yield driver
89 finally:
90 driver.quit()
91
92
93def test_icons(driver: WebDriver, icons: AppHarness):

Callers

nothing calls this directly

Calls 3

frontendMethod · 0.80
poll_for_valueMethod · 0.80

Tested by

no test coverage detected