Loading challenge...
Sync shopping cart across tabs
Available items to add
Wireless Headphones
$79.99
Smart Watch
$199.99
Laptop Stand
$49.99
USB-C Hub
$39.99
Mechanical Keyboard
$129.99
Your cart syncs across tabs
Your cart is empty
Real-time cart synchronization log
No sync events yet...
Playwright multi-tab example
// Test cart sync between tabs
const page1 = await context.newPage();
const page2 = await context.newPage();
await page1.goto('/challenges/multi-tab-cart');
await page2.goto('/challenges/multi-tab-cart');
// Add item in first tab
await page1.click('[data-add-to-cart="prod-1"]');
// Verify cart synced to second tab
await expect(page2.locator('#cart-count')).toContainText('1 items');
await expect(page2.locator('[data-cart-item="prod-1"]')).toBeVisible();
// Update quantity in tab 2
await page2.click('[data-increase="prod-1"]');
// Verify synced back to tab 1
await expect(page1.locator('[data-quantity="prod-1"]')).toHaveText('2');Automation hints