Code injection requires manual page refresh to work properly in Puppeteer
Detailed Description I'm experiencing an issue when using the code injection functionality from the demo. When launching a browser through Puppeteer and navigating to the target page, the injected code fails to take effect immediately and cannot intercept the required parameters. The interception only works after manually refreshing the page once. Steps to Reproduce Launch browser using Puppeteer Inject the demo code using evaluateOnNewDocument Navigate to the target page Expected Result: Injected code should immediately intercept target parameters Actual Result: Parameters are not intercepted, page behavior is abnormal Manually refresh the page (F5 or Ctrl+R) After refresh, the injected code starts working correctly and successfully intercepts parameters
https://github.com/user-attachments/assets/a3df6b91-6a5f-44ff-88f4-bd6435a3ab7b