Befunde der Abschlussprüfung behoben

This commit is contained in:
Rsclub2_2 committed 2026-11-15 03:02:45 +01:00
1 parent 7bd3498501
commit 95a23c0e45
23 files changed
+651 -44

No files matched your search

+5 -2
View File
@@ -26,13 +26,16 @@ def looks_unsubscribed(text: str) -> bool:
def needs_input(elements: list[dict]) -> bool:
"""True if the page still offers something to fill in or a button that looks like a confirmation."""
"""True if the page still offers something to fill in, or a button or link that looks like a confirmation.
Clickable non-form elements (links, buttons, elements with a role such as button) count by their label. The
snapshot does not record the role: such elements are listed with their own tag (div, span, ...)."""
for e in elements:
if e["tag"] in ("select", "textarea"):
return True
if e["tag"] == "input" and e["type"] not in ("button", "submit", "reset", "image"):
return True
if (e["tag"] == "button" or e["type"] in ("button", "submit")) and _CONFIRM.search(e.get("label", "")):
if (e["tag"] != "input" or e["type"] in ("button", "submit")) and _CONFIRM.search(e.get("label", "")):
return True
return False