Stay signed in when the session warning appears
Medium50 pts~2 min
- Explicit waits
- Modals
- Delayed content
- Countdowns
Practice app · FinBank
A retail net-banking portal: captcha-protected login, an accounts dashboard with masked balances, a sortable and paginated transactions table, beneficiary management, OTP-verified fund transfers behind a native confirm, a session-timeout warning and statements that open in a new tab.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
A couple of seconds after the dashboard loads, a “Your session is about to expire” dialog appears with a countdown. Wait for it without fixed sleeps, choose Stay signed in, and verify the session was extended.
Your task
- 1Open TEST_URL. You are already logged in and on the dashboard.
- 2Wait for the dialog #session-modal to appear (it opens after a delay) and assert it says “Your session is about to expire”.
- 3Optionally read the countdown from #session-countdown.
- 4Click Stay signed in (#session-stay).
- 5Assert the dialog closed, #session-status reads “Your session has been extended” and the dashboard (#welcome-message) is still shown.
Acceptance criteria
- The session dialog is closed.
- The session-extended message is shown.
- The customer is still logged in.
- The test uses no fixed sleeps.
Fixtures
- Customer ID
- 11223344
- Password
- Bank@2026
- Customer name
- Neha Sharma
- Captchas
- Rotate through 7KQ2X → M4P9T → R8W3N → H2D6Y → B5V7L → P3J8C (always read the current one from #captcha-text)
- OTP
- 482915
- Savings balance
- ₹2,58,350 (account XXXX XXXX 4821)
- Current balance
- ₹3,42,100 (account XXXX XXXX 7390)
- Beneficiaries
- BEN-101 Rahul Mehta · BEN-102 Priya Nair · BEN-103 Kavya Iyer
- IFSC format
- 4 letters + 0 + 6 letters or digits, e.g. FINB0001234
- First transfer reference
- FB-TXN-90017
- Statement ID
- Shown only on the statement tab
Selenium WebDriver 4 · Selenium Challenges · FinBank