Skip to content

Reject boolean input_text indexes#4815

Open
FU-max-boop wants to merge 1 commit into
browser-use:mainfrom
FU-max-boop:fix/reject-boolean-action-index
Open

Reject boolean input_text indexes#4815
FU-max-boop wants to merge 1 commit into
browser-use:mainfrom
FU-max-boop:fix/reject-boolean-action-index

Conversation

@FU-max-boop

@FU-max-boop FU-max-boop commented May 10, 2026

Copy link
Copy Markdown

Fixes #4796.

Summary

  • Tighten InputTextAction.index to a strict integer so booleans are not coerced into element indexes.
  • Add regression coverage for true/false indexes while preserving normal integer indexes.

Validation

  • python3 -m py_compile browser_use/tools/views.py tests/ci/test_action_validation.py
  • git diff --check
  • .venv-test/bin/python -m pytest tests/ci/test_action_validation.py -q

Summary by cubic

Reject boolean indexes in InputTextAction by switching index to StrictInt so True/False are not coerced to 1/0. Add tests that fail on boolean indexes and pass for valid integer indexes.

Written for commit f901236. Summary will update on new commits.

Review in cubic

@CLAassistant

CLAassistant commented May 10, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@FU-max-boop FU-max-boop force-pushed the fix/reject-boolean-action-index branch from 10f6f56 to f901236 Compare May 29, 2026 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bu-2-0 emits {input_text: {index: true}} (boolean) instead of integer on auth0-style login pages (✨)

2 participants