How can I open a new browser tab from within a router handler?
Hi there,
I'm currently running a PlaywrightCrawler with crawlee and I would like to open a new tab from within a route handler, so that I can run the following:
Would that actually work?
NB: The website supports only downloading one single request at a time via cookies. Since the navigation on the new tab takes some time though, I'd like to run that concurrently in two tabs while the first request downloads.
Then, after that's done, i'd like to initiate the second download on the already pre-navigated page.
LMK if the context here is not clear.
1 Reply
Not sure if I understand, but you can use regular Playwright calls inside the router. Does https://stackoverflow.com/a/64279379 answers your question.
Beware, you probably need to wait for the newly open tab to close and finish, otherwise procession your initial route tab may finish sooner before the new opened one is finished, At that point you get and exception.
Stack Overflow
How to open the new tab using Playwright (ex. click the button to o...
I am looking for a simpler solution to a current situation. For example, you open the google (any another website) and you want BY CLICK on the button (ex. Gmail) - open this page in the new tab us...