browser4-cli 4.13.17 → 4.13.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browser4-cli",
3
- "version": "4.13.17",
3
+ "version": "4.13.18",
4
4
  "description": "Browser automation CLI for AI agents",
5
5
  "type": "module",
6
6
  "files": [
@@ -162,17 +162,32 @@ cat > "$TEST_PAGE" <<'HTML'
162
162
  </body></html>
163
163
  HTML
164
164
 
165
- python3 -m http.server "$TEST_PORT" --bind 127.0.0.1 > /dev/null 2>&1 &
165
+ # Serve the fixture from $TEMP_DIR: without --directory, python http.server
166
+ # serves the *current working directory* (the CI workspace / repo checkout),
167
+ # so every run browsed Python's 404 "Error response" page instead of the
168
+ # fixture. Backends that tolerate type/click on a missing element let that
169
+ # pass silently; the loud "no element found for selector [#input1]" failure
170
+ # exposed the harness bug on all three platforms.
171
+ python3 -m http.server "$TEST_PORT" --bind 127.0.0.1 --directory "$TEMP_DIR" > /dev/null 2>&1 &
166
172
  HTTP_PID=$!
167
173
  TEST_URL="http://127.0.0.1:$TEST_PORT/test.html"
168
174
 
169
- # Wait for HTTP server to be ready
175
+ # Wait for the HTTP server to actually serve the fixture. curl -f fails on
176
+ # 4xx/5xx, so a server serving the wrong directory (or not yet ready) cannot
177
+ # silently hand the browser an error page — earlier runs typed into a 404
178
+ # page whenever the interactive commands tolerated a missing element.
179
+ SERVING_OK=""
170
180
  for i in $(seq 1 10); do
171
- if curl -s -o /dev/null "$TEST_URL" 2>/dev/null; then
181
+ if curl -sf -o /dev/null "$TEST_URL" 2>/dev/null; then
182
+ SERVING_OK=1
172
183
  break
173
184
  fi
174
185
  sleep 0.5
175
186
  done
187
+ if [ -z "$SERVING_OK" ]; then
188
+ info "FATAL: test page not served at $TEST_URL (python http.server not serving $TEMP_DIR?)"
189
+ exit 1
190
+ fi
176
191
 
177
192
  # ---------------------------------------------------------------------------
178
193
  # step 3: determine server URL (let CLI auto-start the server)