#!/bin/bash # E2E test helpers for agent-browser that work reliably with React components. # Uses JS-based clicks (element.click()) instead of pointer events to avoid # stale ref issues after iframe reloads. # Click a button by its exact text content click_button() { local text="$1" agent-browser eval --stdin </dev/null || echo "timeout waiting for: ${text}" }