How to achieve nested switch-tab in Playwright? The below code works fine for one pop-up or switch tab. But if I want to move back and forth from tab 4 to tab 1 and then tab 3 again, then what would be the solution?
const [popup] = await Promise.all([
page.waitForEvent('popup'),
page.click('#open')
]);