Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

fix: wait for Chrome instance to be ready before running tests

Boschf564a3b2f9a1
diff --git a/tests/e2e/scenarios-cli/run-all.sh b/tests/e2e/scenarios-cli/run-all.sh
index 9935dffc..87e61435 100755
--- a/tests/e2e/scenarios-cli/run-all.sh
+++ b/tests/e2e/scenarios-cli/run-all.sh
@@ -16,16 +16,27 @@ echo " Server: $PINCHTAB_URL"
echo " Fixtures: $FIXTURES_URL"
echo ""
-# Wait for server to be ready
+# Wait for server AND instance to be ready
echo "Waiting for pinchtab server..."
for i in $(seq 1 30); do
if curl -s "$PINCHTAB_URL/health" > /dev/null 2>&1; then
- echo "Server ready!"
+ echo "Server responding..."
break
fi
sleep 1
done
+echo "Waiting for Chrome instance to be ready..."
+for i in $(seq 1 60); do
+ # Try a simple snapshot - if it works, Chrome is ready
+ if PINCHTAB_URL="$PINCHTAB_URL" pinchtab health 2>/dev/null | grep -q '"ready":true'; then
+ echo "Instance ready!"
+ break
+ fi
+ echo " waiting... ($i/60)"
+ sleep 2
+done
+
# Verify pinchtab CLI is available
if ! command -v pinchtab &> /dev/null; then
echo "ERROR: pinchtab CLI not found in PATH"