Get an instance of the browser open to the upload_file app. Args: upload_file: harness for DynamicRoute app Yields: WebDriver instance.
(upload_file: AppHarness)
| 401 | |
| 402 | @pytest.fixture |
| 403 | def driver(upload_file: AppHarness): |
| 404 | """Get an instance of the browser open to the upload_file app. |
| 405 | |
| 406 | Args: |
| 407 | upload_file: harness for DynamicRoute app |
| 408 | |
| 409 | Yields: |
| 410 | WebDriver instance. |
| 411 | """ |
| 412 | assert upload_file.app_instance is not None, "app is not running" |
| 413 | driver = upload_file.frontend() |
| 414 | try: |
| 415 | yield driver |
| 416 | finally: |
| 417 | driver.quit() |
| 418 | |
| 419 | |
| 420 | @pytest.fixture |