Read a statement ID from a new tab
Medium55 pts~2 min
- Multiple windows/tabs
- Window handles
- Passing data between pages
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
Open the October 2026 savings statement, which opens in a new tab, read its Statement ID there, then switch back and record the ID on the main page.
Your task
- 1Open TEST_URL (already logged in) and click Statement (#nav-statement).
- 2Type 01/10/2026 into #statement-from and 31/10/2026 into #statement-to (the Savings account is selected by default).
- 3Click View statement (#view-statement). The statement opens in a new tab.
- 4Switch to the new tab, wait for #statement-id and read its text.
- 5Close the statement tab, switch back to the main tab, type the ID into #statement-id-input and click #statement-id-confirm.
- 6Assert #statement-id-status reads “Statement ID confirmed”.
Acceptance criteria
- The Statement ID from the new tab is recorded on the main page.
- The main page confirms the Statement ID.
- The test makes at least two assertions.
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
Playwright · Playwright Challenges · FinBank