How to test multiple tabs in Cypress

Paul de Witt
Level Up Coding
Published in
2 min readJul 12, 2023

--

Pro-tip: Stub the window object.

Photo by Michael on Unsplash

A trade-off of Cypress is that they will never support multiple browser tabs.

In most cases, that is perfectly fine. If you are testing an application that visits another application by clicking a button, then you only want to verify the hyperlink is correct. You can't control the other application's behavior. So by choosing to test it loads…

--

--

Test Automation Specialist, trainer, Breathlete, DJ, and father of three. Creator at heart.