How can you catch javascript redirects which were made by document.location = url
in Puppeteer? Is there any way to do that?
Asked
Active
Viewed 30 times
0

JamesJGoodwin
- 350
- 1
- 3
- 17
-
1Possible duplicate of [Event when window.location.href changes](https://stackoverflow.com/questions/3522090/event-when-window-location-href-changes) – Amr Aly Jan 24 '19 at 15:42
1 Answers
1
Can you try to listen for 'domcontentloaded' event?
page.on('domcontentloaded', () => { console.log(page.url()); });

vsemozhebuty
- 12,992
- 1
- 26
- 26