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 27 times
0
JamesJGoodwin
- 291
- 1
- 3
- 15
-
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
- 11,533
- 1
- 22
- 23