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

Function driver

tests/integration/test_background_task.py:242–256  ·  view source on GitHub ↗

Get an instance of the browser open to the background_task app. Args: background_task: harness for BackgroundTask app Yields: WebDriver instance.

(background_task: AppHarness)

Source from the content-addressed store, hash-verified

240
241@pytest.fixture
242def driver(background_task: AppHarness) -> Generator[WebDriver, None, None]:
243 """Get an instance of the browser open to the background_task app.
244
245 Args:
246 background_task: harness for BackgroundTask app
247
248 Yields:
249 WebDriver instance.
250 """
251 assert background_task.app_instance is not None, "app is not running"
252 driver = background_task.frontend()
253 try:
254 yield driver
255 finally:
256 driver.quit()
257
258
259@pytest.fixture

Callers

nothing calls this directly

Calls 1

frontendMethod · 0.80

Tested by

no test coverage detected