Improve Puppeteer tools reliability: Fix content fetching workflow and browser-compatible JS execution #455
Open
Description
- Missing Content Fetching After Navigation
Problem: After puppeteer_navigate, Claude may proceed without fetching page content (via puppeteer_evaluate or puppeteer_screenshot), leading to fabricated analysis based on no actual data.
Steps to reproduce:
Request Claude to analyze a webpage
Claude uses puppeteer_navigate to visit the page
Claude immediately starts analyzing without fetching content
Expected: Claude should fetch page content before analysis
Actual: Claude proceeds with analysis using no real data
- Browser-Incompatible JavaScript in Evaluate
Problem: Claude generates JavaScript code for puppeteer_evaluate that's incompatible with content, then continues without fixing the code when errors occur.
Steps to reproduce:
When execution fails, Claude doesn't modify code
Expected: Claude should:
Generate browser-compatible code
Fix code if execution fails
Properly handle browser console context
Impact:
Unreliable webpage analysis
Task blockages due to failed JavaScript execution
Incorrect information in responses