INNER CODE UNIT · Python

frame_result

yaojingang/GEOFlow · scripts/audit-admin-ui-v3-navigation.py:69

def frame_result(page, expected_state: str, expected_sidebar: float, expected_body_x: float) -> dict:
    try:
        page.wait_for_function("() => window.__gfFrames?.length >= 40", timeout=5000)
    except PlaywrightTimeoutError:
        pass

    frames = [frame for frame in page.evaluate("window.__gfFrames") if frame.get("sidebar") and frame.get("shellBody")]
    if not frames:
        return {
            "status": "fail",
            "error": "No measurable shell frame was captured.",
            "first": None,
            "final": None,
            "deltas": None,
        }

    first = frames[0]
    final = frames[-1]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…