Stably Logo
Testing Strategy
Sun Dec 08 2024

Multi-Tab Testing Made Simple

Stably has introduced intelligent multi-tab testing capabilities that automatically track and manage actions across different browser tabs during test recording, eliminating the need for complex code implementation and making it easier to create tests that reflect real user navigation patterns.


Ever watched someone navigate a modern website? It's fascinating. They click a link, and suddenly they're juggling multiple tabs like a digital circus performer. One tab leads to product details, another opens documentation, while a third might load a comparison chart. This non-linear navigation has become second nature to users – but it's been a persistent headache for test automation.


The Multi-Tab Challenge

Think about how you use websites in real life. You might be shopping online, opening several product tabs to compare prices. Or perhaps you're using a web application that naturally spans multiple tabs – like a document management system where you need to reference several files simultaneously. This is the reality of modern web usage, and our automated tests need to reflect these real-world scenarios.


Traditional automated testing frameworks like Playwright do provide mechanisms for handling multiple tabs, but the implementation can be surprisingly complex. Consider this typical Playwright code for handling a new tab:


// Wait for the new tab to open
const [newPage] = await Promise.all([
  context.waitForEvent('page'),
  // Click the button that opens a new tab
  page.click('#open-new-tab-button')
]);

// Switch to the new tab and interact with it
await newPage.waitForLoadState();
await newPage.fill('#some-input', 'test value');

// Switch back to the original tab
await page.bringToFront();


Not only is this verbose, but it also requires careful handling of promises, explicit wait states, and manual tab management. Now imagine maintaining this across dozens of tests, each with their own unique multi-tab workflows. The complexity compounds quickly.


How Stably Simplifies Multi-Tab Testing

We've reimagined how multi-tab testing should work. Instead of wrestling with complex code and manual tab management, Stably's AI-assisted test recorder handles everything automatically. Here's what happens behind the scenes:


  1. As you record your test, Stably keeps track of every tab that opens
  2. It intelligently records which actions you perform on each tab
  3. In your editor panel, you'll see helpful tab labels that clearly indicate which actions belong to which tab
  4. When you play back your test, Stably handles all the tab switching automatically

This means you can focus on what matters – creating meaningful tests – while Stably handles the technical complexity of tab management.


Real-World Example

Imagine you're testing a documentation website where users often need to:


  1. Start on the main documentation page
  2. Open several reference pages in new tabs
  3. Compare information across these tabs
  4. Return to the main page to continue navigation

With Stably, you simply perform these actions naturally while recording your test. Our AI recognizes tab switches, maintains context across tabs, and generates reliable tests that mirror real user behavior. No need to write complex tab management code or worry about synchronization issues.


The visual feedback in our editor makes it crystal clear which actions are associated with each tab. You might see something like:



This clarity makes tests easier to understand, maintain, and debug – especially when you return to them weeks or months later.


The Bigger Picture

This intelligent tab management is just one piece of Stably's larger mission to revolutionize web testing. We're continuously adding features that address real-world testing challenges, making it easier to create and maintain robust test suites that truly reflect how users interact with your websites.


Combined with our existing AI-powered capabilities – like automatic test maintenance and intelligent element detection – Stably's tab management feature means you can write tests once and trust them to keep working, even as your website evolves. No more spending hours updating tests just because your UI changed slightly or your navigation patterns evolved.


What's next? We're constantly working on new features to make testing even more intuitive and reliable. But one thing remains constant: our commitment to creating tests that you only need to write once, no matter how your website grows and changes.


Ready to experience hassle-free multi-tab testing? Give Stably a try and see how we're transforming web testing, one feature at a time. Because in the end, your tests should be as natural and fluid as the user experiences they're verifying. 🚀

Posted by
Bassam Ahmed
Bassam Ahmed
Software Engineer at Stably
Stably Logo
All systems operational.
Copyright ©2025 stably.ai