Power Your Software Testing with AI Agents and Cloud
The Native AI-Agentic Cloud Platform to Supercharge Quality Engineering. Test Intelligently and Ship Faster.
- TestMu AI (Formerly LambdaTest)
- /
- Use Cases
- /
- Test a lead form and the callback it promises
Test a lead form and the callback it promises
Reject a short number, submit a valid lead, then check the reference, the window and the named advisor.
Published on:
On a lead generation site the form is the revenue. Every failed submission is a prospect who went to a competitor, and a validation rule that rejects valid numbers is as costly as one that accepts nothing.
This use case submits a callback request on the Policybaazar clone, validation first.
Failure modes in this flow
The confirmation has to be specific enough that the prospect believes a person will actually call.
- Validation fires - a five digit number is refused with the expected length named.
- The reference exists - PB-310442, which the prospect can quote.
- The number is echoed - so a typo is catchable while they still care.
- The window and the advisor - a named time slot and a named person, which is what makes the promise concrete.
Echoing the number back is the assertion worth copying. A lead captured against a mistyped number is worse than no lead: the business pays for it, calls nobody, and the prospect waits.
Note: Testing the rejection before the submission is what proves validation exists rather than inferring it from a success. Try it on TestMu AI. Try free!
Writing the objective
The error names the expected length rather than saying the number is invalid, which is the difference between a prospect correcting it and abandoning.
---
mode: testing
url: https://my-testing-repo-main.vercel.app/policybazaar-clone-app/callback?reset=true
max_steps: 40
tags: [policybazaar, insurance, lead]
---
# Policybaazar 27.2: Lead form to callback
Catalog objective: submit interest and verify the callback is scheduled.
Key assertion: a confirmation appears with an advisor callback promise.
## Verify a bad number is refused
Type "Priya Nair" into "Name", type "98765" into "Mobile number", click "Request a callback", and verify a red banner reads "Enter a 10 digit mobile number."
## Submit a valid lead
Replace the mobile number with "9876543210", select "Term life insurance" in "I am interested in", select "Tomorrow 10:00 - 11:00" in "Call me", and click "Request a callback".
## Verify the confirmation
Verify a green card titled "Callback scheduled" shows "Reference" of "PB-310442", "We will call" of "9876543210", "Window" of "Tomorrow 10:00 - 11:00" and "Advisor" of "Rhea Menon".
## Verify the request is recorded
Verify the "Your requests" card shows "Callbacks requested" of 1 with a "Callback scheduled" badge on the "PB-310442" row.The final step asserts the request count as well as the row, which proves exactly one lead was created rather than a duplicate pair from a double submit.
The assertions in detail
A refusal, a submission, a confirmation and the record.
| Step | What it proves |
|---|---|
| Verify a bad number is refused | Length validation fires with a helpful message |
| Submit a valid lead | Name, number, interest and time slot are accepted |
| Verify the confirmation | Reference, echoed number, window and advisor are all shown |
| Verify the request is recorded | Exactly one request exists with a scheduled badge |
A confirmation that appears without the lead being recorded is the worst outcome here, which is why the count is asserted separately from the banner.
Running it locally
kane-cli testmd run tests/policybazaar/lead-callback_test.mdAdd a double submit, since duplicate leads are paid for twice and annoy the prospect once.
Lead forms are worth watching continuously rather than at release time. Kane CLI in a pipeline covers scheduled checks, and exact string assertions covers pinning each validation message.
Author
Bhawana is a Community Evangelist at TestMu AI with over 3 years of experience creating technically accurate, strategy-driven content in software testing. She has authored 50+ blogs on test automation, cross-browser testing, mobile testing, and real device testing. She also serves as Product Marketing Manager for Kane CLI, the command-line tool that runs browser automation from the terminal using natural-language flows in a real Chrome browser. Bhawana is certified in KaneAI, Selenium, Appium, Playwright, and Cypress, reflecting her hands-on knowledge of modern automation practices. On LinkedIn, she is followed by 6000+ QA engineers, testers, AI automation testers, and tech leaders.
Lead Form FAQs
Did you find this page helpful?
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance
- Advanced access controls
- Advanced data retention rules
- Advanced Local Testing
- Premium Support options
- Early access to beta features
- Private Slack Channel
- Unlimited Manual Accessibility DevTools Tests




