I'm doing an automation, at the time of download it opens a tab, sometimes it doesn't close automatically, so how can I close a tab in playwright using python?
I managed to make a code that closes only a specific tab!
all_pages = page.context.pages
await all_pages[1].close()