Files
computer/libs/python/bench-ui/README.md
2025-11-01 19:44:35 -04:00

580 B

CUA Bench UI

Lightweight webUI window controller for CUA bench environments using pywebview

Usage

from bench_ui import launch_window, get_element_rect, execute_javascript

# Launch a window with inline HTML content
pid = launch_window(html="<html><body><h1>Hello</h1></body></html>")

# Get element rect in screen space
rect = get_element_rect(pid, "h1", space="screen")
print(rect)

# Execute arbitrary JavaScript
text = execute_javascript(pid, "document.querySelector('h1')?.textContent")
print(text)

Installation

pip install cua-bench-ui