INNER CODE UNIT · Python

deadline

browser-use/macos-harness · src/macos_harness/browser.py:24

    deadline = time.monotonic() + timeout
    while not stop.is_set() and time.monotonic() < deadline:
        root = AS.AXUIElementCreateSystemWide()
        pressed = False
        windows = AS.CGWindowListCopyWindowInfo(
            AS.kCGWindowListOptionOnScreenOnly, AS.kCGNullWindowID
        )
        for window in windows:
            if window.get("kCGWindowOwnerName") != "Google Chrome":
                continue
            if window.get("kCGWindowName") != "Allow remote debugging?":
                continue
            bounds = window.get("kCGWindowBounds") or {}
            left = float(bounds.get("X", 0))
            top = float(bounds.get("Y", 0))
            width = float(bounds.get("Width", 0))
            height = float(bounds.get("Height", 0))
            points = [(left + width - 58, top + height - 38)]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…