feat: add 14 new browser automation tools#54
Conversation
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)
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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)
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. Comment |
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 contentget_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 browserWindow/Tab Management (closes #37)
switch_to_window— Switch to a window/tab by handleget_window_handles— List all window/tab handlesswitch_to_latest_window— Switch to most recently opened windowclose_current_window— Close current window and switch backFrame Management
switch_to_frame— Switch focus to iframe by locator or indexswitch_to_default_content— Return focus to main page from iframeAlert/Dialog Handling
accept_alert— Accept browser alert/confirm/prompt dialogsdismiss_alert— Dismiss browser dialogsget_alert_text— Read alert dialog textsend_alert_text— Type into prompt dialogsBug Fix
Testing
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.