Skip to content

feat: add 14 new browser automation tools#54

Merged
angiejones merged 2 commits intomainfrom
feat/new-tools
Feb 21, 2026
Merged

feat: add 14 new browser automation tools#54
angiejones merged 2 commits intomainfrom
feat/new-tools

Conversation

@angiejones
Copy link
Copy Markdown
Owner

@angiejones angiejones commented Feb 21, 2026

Summary

Adds 14 new tools. All tools follow existing patterns, include full test coverage, and are backward-compatible.

New Tools

Element Utilities

  • clear_element — Clear input/textarea content
  • get_element_attribute — Get element attribute values (e.g., href, value, class)
  • scroll_to_element — Scroll page to make element visible (closes Scroll to an element #22)
  • execute_script — Execute arbitrary JavaScript in the browser

Window/Tab Management (closes #37)

  • switch_to_window — Switch to a window/tab by handle
  • get_window_handles — List all window/tab handles
  • switch_to_latest_window — Switch to most recently opened window
  • close_current_window — Close current window and switch back

Frame Management

  • switch_to_frame — Switch focus to iframe by locator or index
  • switch_to_default_content — Return focus to main page from iframe

Alert/Dialog Handling

  • accept_alert — Accept browser alert/confirm/prompt dialogs
  • dismiss_alert — Dismiss browser dialogs
  • get_alert_text — Read alert dialog text
  • send_alert_text — Type into prompt dialogs

Bug Fix

Testing

  • 26 new tests covering all new tools
  • 4 new test fixtures (alerts, frames, scroll, windows)
  • Updated server test to verify all 28 tools
  • All 72 tests pass ✅

Credits

Inspired by community contributions from @NachoBrito (#38), @dhivakaranthonydoss7-eng (#36), @VishalBose7 (#27), and @rpallavisharma (#28). Their PRs were closed in favor of this consolidated implementation with consistent patterns and full test coverage.

New tools added:
- clear_element: Clear input/textarea content
- get_element_attribute: Get element attribute values
- scroll_to_element: Scroll page to make element visible (closes #22)
- execute_script: Execute JavaScript in the browser
- switch_to_window: Switch to window/tab by handle (closes #37)
- get_window_handles: List all window/tab handles
- switch_to_latest_window: Switch to most recently opened window
- close_current_window: Close current window and switch back
- switch_to_frame: Switch focus to iframe by locator or index
- switch_to_default_content: Return focus to main page from iframe
- accept_alert: Accept browser alert/confirm/prompt dialogs
- dismiss_alert: Dismiss browser dialogs
- get_alert_text: Read alert dialog text
- send_alert_text: Type into prompt dialogs

Also includes:
- Fix resource list API for MCP client compatibility (closes #33)
- 26 new tests covering all new tools
- 4 new test fixtures (alerts, frames, scroll, windows)
- Updated server test to verify all 28 tools

Credits: Inspired by contributions from @NachoBrito (#38), @dhivakaranthonydoss7-eng (#36), @VishalBose7 (#27), @rpallavisharma (#28)
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 21, 2026

Warning

Rate limit exceeded

@angiejones has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 1 minutes and 27 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/new-tools

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@angiejones angiejones merged commit 671791c into main Feb 21, 2026
4 checks passed
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.

Multiple tabs support? MCP Resource List issue Scroll to an element

1 participant