feat: Add ARIA ref-based browser automation and network request tracking #65
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR enhances the browser automation tools by implementing ARIA ref-based element targeting and comprehensive network request monitoring. These changes provide more reliable web scraping capabilities and better debugging tools.
Key Changes
ARIA Ref-Based Element Targeting
scraping_browser_snapshot
: Captures ARIA snapshots showing all interactive elements with unique refsscraping_browser_click_ref
: Click elements using stable ref attributes instead of fragile CSS selectorsscraping_browser_type_ref
: Type into form fields using ref-based targetingscraping_browser_wait_for_ref
: Wait for elements to appear using refsNetwork Request Monitoring
scraping_browser_network_requests
: View all network activity with method, URL, and status codesBenefits
Testing
Migration Notes
Tools have been renamed for clarity:
scraping_browser_click
→scraping_browser_click_ref
scraping_browser_type
→scraping_browser_type_ref
scraping_browser_links
→scraping_browser_snapshot
The new ref-based approach requires using
scraping_browser_snapshot
first to identify element refs, then using those refs with the interaction tools.