0

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

JamesJGoodwin
  • 350
  • 1
  • 3
  • 17
  • 1
    Possible 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 Answers1

1

Can you try to listen for 'domcontentloaded' event?

page.on('domcontentloaded', () => { console.log(page.url()); });
vsemozhebuty
  • 12,992
  • 1
  • 26
  • 26