Automation lab Aú State & Session Management (STATE_SESSION)
Lab 048: Cross-tab update using BroadcastChannel
Practice cross-tab update using broadcastchannel in a real web app context as part of the State & Session Management module.
intermediate
intermediate
Objectives
Use for test scripts- Understand the purpose and business flow of cross-tab update using broadcastchannel.
- Design stable locators for key UI elements.
- Automate user interactions and verify the resulting UI state.
Sandbox
State & Session / state / intermediate / active
Cross-tab update using BroadcastChannel
Simulate cross-tab messaging; broadcast updates to listeners.
Reading and understanding requirements
Choosing stable locators
Designing assertions based on business rules
Learning objectives
- Send messages to simulated tabs.
- Observe listener updating UI.
- Assert message payload content.
Steps
- Broadcast a message.
- Verify listener receives and renders it.
- Send another message to overwrite state.
Practice sandbox
Broadcast to mock listeners.
Sender
Last sent: none
Listener
Last received: none
No broadcasts yet
Assertions to practice
- Sending updates "Last sent".
- Listener text matches sent payload.
- Status shows delivered message content.