Playwright

Validate and add a beneficiary

Medium55 pts~2 min
  • Form validation
  • Field errors
  • Correcting input
  • Multiple assertions
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-add-beneficiary-validation

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

Objective

Submit the Add beneficiary form with a mismatched account number and an invalid IFSC, verify the field errors, then correct the data and verify the beneficiary is added.

Your task

  1. 1Open TEST_URL (already logged in), click Beneficiaries (#nav-beneficiaries) and then Add beneficiary (#add-beneficiary).
  2. 2Type Ananya Gupta into #ben-name, 60123456789012 into #ben-account, 60123456789021 into #ben-confirm-account and FINB123 into #ben-ifsc, then click #ben-submit.
  3. 3Assert #ben-confirm-account-error reads “Account numbers do not match” and #ben-ifsc-error mentions a valid IFSC.
  4. 4Correct #ben-confirm-account to 60123456789012 and #ben-ifsc to FINB0007788, type Ananya into #ben-nickname and click #ben-submit.
  5. 5Assert #ben-success confirms “Beneficiary Ananya Gupta added successfully” and the new row (data-beneficiary-id="BEN-104") shows FINB0007788.

Acceptance criteria

  • The mismatched account number and the invalid IFSC are reported on their fields.
  • After the corrections, the success message names Ananya Gupta.
  • The beneficiary list has 4 rows, including BEN-104 with IFSC FINB0007788.
  • The test makes at least three 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