How-to preserve HAR log on popups

1. First, open DevTools on the webpage where you want to capture the popup.
2. Click on Settings.

3. Enable “Global → Auto-open DevTools for popups” and “Console → Preserve log upon navigation”.

4. Next, click the popup button to trigger the popup. DevTools should automatically open for the popup at the same time.
5. In the newly opened DevTools for the popup, go to “Sources”, then under “Event Listener Breakpoints,” check “Window.”

6. Now, return to the popup and do whatever you need. When the popup tries to close itself with window.close(), it will trigger the debugger to pause, giving you time to go back to the Network tab and export the HAR file.

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理