WebDriver fixture for testing deploy_url. Args: deploy_url_sample: AppHarness fixture for testing deploy_url. Yields: WebDriver: A WebDriver instance.
(deploy_url_sample: AppHarness)
| 53 | |
| 54 | @pytest.fixture |
| 55 | def driver(deploy_url_sample: AppHarness) -> Generator[WebDriver, None, None]: |
| 56 | """WebDriver fixture for testing deploy_url. |
| 57 | |
| 58 | Args: |
| 59 | deploy_url_sample: AppHarness fixture for testing deploy_url. |
| 60 | |
| 61 | Yields: |
| 62 | WebDriver: A WebDriver instance. |
| 63 | """ |
| 64 | assert deploy_url_sample.app_instance is not None, "app is not running" |
| 65 | driver = deploy_url_sample.frontend() |
| 66 | try: |
| 67 | yield driver |
| 68 | finally: |
| 69 | driver.quit() |
| 70 | |
| 71 | |
| 72 | def test_deploy_url(deploy_url_sample: AppHarness, driver: WebDriver) -> None: |