High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.
fix(e2e): use non-navigating button for lite click test
Bosch1b44b7970205
diff --git a/tests/e2e/fixtures/lite-test.html b/tests/e2e/fixtures/lite-test.htmlnew file mode 100644index 00000000..84d9ec46--- /dev/null+++ b/tests/e2e/fixtures/lite-test.html@@ -0,0 +1,15 @@+<!DOCTYPE html>+<html lang="en">+<head>+ <meta charset="UTF-8">+ <title>Lite Engine Test</title>+</head>+<body>+ <h1>Lite Test Page</h1>+ <form>+ <input type="text" id="name" placeholder="Enter name">+ <button type="button" id="btn">Click Me</button>+ </form>+ <p id="info">Static content for text extraction.</p>+</body>+</html>diff --git a/tests/e2e/scenarios/42-lite-engine.sh b/tests/e2e/scenarios/42-lite-engine.shindex 923db72c..a13a59d6 100755--- a/tests/e2e/scenarios/42-lite-engine.sh+++ b/tests/e2e/scenarios/42-lite-engine.sh@@ -79,15 +79,20 @@ end_test# --- T6: Click action routes through lite ---start_test "Lite engine: click action"-# Get interactive snapshot to find a clickable ref-lite_get "/snapshot?tabId=${TAB_ID}&filter=interactive"-BUTTON_REF=$(echo "$RESULT" | jq -r '[.nodes[] | select(.role == "link" or .role == "button")] | first // empty | .ref // empty')+# Navigate to a page with a non-navigating button (type=button)+lite_post /navigate "{\"url\":\"${FIXTURES_URL}/lite-test.html\"}"+assert_ok "navigate to lite test page"+ACTION_TAB=$(echo "$RESULT" | jq -r '.tabId // empty')++# Get interactive snapshot to find the button+lite_get "/snapshot?tabId=${ACTION_TAB}&filter=interactive"+BUTTON_REF=$(echo "$RESULT" | jq -r '[.nodes[] | select(.role == "button")] | first // empty | .ref // empty')if [ -n "$BUTTON_REF" ]; then- lite_post /action "{\"tabId\":\"${TAB_ID}\",\"kind\":\"click\",\"ref\":\"${BUTTON_REF}\"}"+ lite_post /action "{\"tabId\":\"${ACTION_TAB}\",\"kind\":\"click\",\"ref\":\"${BUTTON_REF}\"}"assert_ok "lite click"else- echo -e " ${RED}✗${NC} no interactive element found for click test"+ echo -e " ${RED}✗${NC} no button found for click test"((ASSERTIONS_FAILED++)) || truefiend_test@@ -95,10 +100,8 @@ end_test# --- T7: Type action routes through lite ---start_test "Lite engine: type action"-# Navigate to form page which has textboxes-lite_post /navigate "{\"url\":\"${FIXTURES_URL}/form.html\"}"-assert_ok "navigate to form"-TYPE_TAB=$(echo "$RESULT" | jq -r '.tabId // empty')+# Reuse the lite-test page which has a textbox+TYPE_TAB="${ACTION_TAB}"lite_get "/snapshot?tabId=${TYPE_TAB}&filter=interactive"INPUT_REF=$(echo "$RESULT" | jq -r '[.nodes[] | select(.role == "textbox")] | first // empty | .ref // empty')