Files
Tirsvad e764269eda Implement the Selenium lecture steps with tests and screenshots (MIL-002)
Driver factory, click_link_by_text, search_for, fill_out_form, run_lecture
and CLI, layered as domain, application, infrastructure and presentation.
30 offline unit tests, a form fixture, a Docker image for headless runs and
four screenshots captured in Docker. Reviews RC-009 (code) and RC-010
(milestone wording of the screenshot criterion).

Task: MIL-002#1
2026-10-28 16:22:41 +08:00

21 lines
648 B
Python

from selenium.webdriver.remote.webdriver import WebDriver
from selenium.webdriver.remote.webelement import WebElement
from fill_out_form.application.ports import BrowserPort, ElementPort
def _accepts_browser(browser: BrowserPort) -> BrowserPort:
return browser
def _accepts_element(element: ElementPort) -> ElementPort:
return element
def test_selenium_types_satisfy_ports_structurally() -> None:
# mypy --strict checks the structural match through these signatures.
assert callable(_accepts_browser)
assert callable(_accepts_element)
assert WebDriver.find_element is not None
assert WebElement.click is not None