Playwright

Cancel a transfer at the browser confirm dialog

Medium50 pts~2 min
  • Native confirm dialogs
  • Dialog handling
  • Negative paths
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.

Test URL
/lab/playwright-finbank-cancel-transfer-confirm

Your starter code already declares TEST_URL — never hardcode a host.

Objective

Prepare a ₹5,000 transfer to Rahul Mehta, then dismiss the browser confirm dialog and verify the transfer was cancelled without debiting the account.

Your task

  1. 1Open TEST_URL (already logged in) and click Fund transfer (#nav-transfer).
  2. 2Select Rahul Mehta (value BEN-101) in #transfer-beneficiary, type 5000 into #transfer-amount and November rent into #transfer-remarks.
  3. 3Click Review transfer (#transfer-review) and assert #review-amount shows ₹5,000.
  4. 4Click Confirm & pay (#transfer-pay). A browser confirm dialog asks “Transfer ₹5,000 to Rahul Mehta?”; assert its message and dismiss it (Cancel).
  5. 5Assert #transfer-status contains “Transfer cancelled” and the OTP dialog (#otp-modal) did not open.

Acceptance criteria

  • The confirm dialog shows the amount and the beneficiary.
  • The dialog is dismissed.
  • The page reports “Transfer cancelled” and no OTP dialog is open.
  • 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