Get an instance of the browser open to the call_script app. Args: call_script: harness for CallScript app Yields: WebDriver instance.
(call_script: AppHarness)
| 379 | |
| 380 | @pytest.fixture |
| 381 | def driver(call_script: AppHarness) -> Generator[WebDriver, None, None]: |
| 382 | """Get an instance of the browser open to the call_script app. |
| 383 | |
| 384 | Args: |
| 385 | call_script: harness for CallScript app |
| 386 | |
| 387 | Yields: |
| 388 | WebDriver instance. |
| 389 | """ |
| 390 | assert call_script.app_instance is not None, "app is not running" |
| 391 | driver = call_script.frontend() |
| 392 | try: |
| 393 | yield driver |
| 394 | finally: |
| 395 | driver.quit() |
| 396 | |
| 397 | |
| 398 | def assert_token(driver: WebDriver) -> str: |