useful-bronze•2y ago
How to abort request if page is redirecting?
I've tried multiple different approaches but to no avail:
1 Reply
Hi, try this: (from stackoverflow):
I think that, in your approach, when
page.on('response', ...)
is fired, the redirect has been already made, that's why you should use page.route
- to catch it before it's sent.Stack Overflow
How to set Playwright not automatically follow the redirect?
I want to open a website using Playwright,
but I don't want to be automatically redirected.
In some other web clients, they have parameter link follow=False to disable automatically following the