Hero Background

Power Your Software Testing with AI Agents and Cloud

The Native AI-Agentic Cloud Platform to Supercharge Quality Engineering. Test Intelligently and Ship Faster.

Kane CLIPayments

Test an express checkout button and its approval window

The payment leaves your page, happens somewhere else, and has to come back. Four steps cover the handoff and the return.

Published on:

An express checkout button hands your customer to another site, asks them to log in there, and waits for them to come back. Three of those four things are outside your control and all four have to work.

This use case covers the full handoff on the PayPaal checkout clone: basket, approval window, login and the completed order on the merchant side.

The flow under test

The handoff is where express checkout fails, and it fails in ways that leave both sides looking correct in isolation.

  • The amount changes across the boundary - the basket says one figure and the approval window asks for another.
  • The merchant is wrong - the approval window names a different business than the one the customer is buying from.
  • The return never happens - approval succeeds and the merchant page never learns about it.

The test asserts $41.06 on the basket and again inside the approval dialog, then a third time on the completion banner. Three assertions on one number is not redundant when the number crosses a trust boundary twice.

Note

Note: Kane CLI keeps multi-window and popup flows intact between steps, because one warm browser serves the whole run. Start on TestMu AI. Try free!

The test file

The approval window is described by what it shows, the merchant name, the amount and its two tabs, rather than by being a popup. The test does not need to know how the window was opened.

---
mode: testing
url: https://my-testing-repo-main.vercel.app/paypal-clone-app/checkout?reset=true
max_steps: 45
tags: [paypal, payments, checkout]
---

# PayPaal 10.1: Express checkout

Catalog objective: pay on a merchant store via the PayPaal button and approve in the popup.
Key assertion: the popup approval returns and the order completes.

## Verify the basket
Verify the basket shows "Heavyweight Cotton Tee" and an "Order total" of "$41.06".

## Open the PayPaal approval window
Click "Pay with PayPaal" and verify a dialog titled "PayPaal" opens showing "Alder & Oak" at "$41.06" with "Log in" and "Pay by card" tabs.

## Log in and approve
Type "priya.nair@example.com" into "Email", type "demo1234" into "Password", and click "Agree and pay $41.06".

## Verify the order completed
Verify a green banner titled "Payment complete" says "$41.06" was paid to Alder & Oak with "PayPaal balance" and shows transaction "TX-9921".

The final assertion names the funding source as well as the amount, because a payment taken from a card when the customer chose a balance is a different transaction with different fees.

Step by step coverage

The value of the flow is in what each step proves about the boundary between the two sites.

StepWhat it proves
Verify the basketThe merchant side has the correct order total before the handoff
Open the approval windowThe window opens naming the right merchant and the same amount
Log in and approveCredentials are accepted and the approval action completes
Verify the order completedControl returned, and the amount, funding source and transaction id are recorded

Asserting the transaction id on the merchant page is what proves the two sides agree on a single payment rather than each believing something separate happened.

Next-generation test execution with TestMu AI

Running it

kane-cli testmd run tests/paypal/express-checkout_test.md

Because Kane CLI holds one browser session across the whole run, the popup and the merchant page stay connected in the same way they do for a customer.

Handoff flows are among the hardest things to cover in a conventional framework, which makes them worth the setup. How browser agents interpret a page is useful background, and the three modes covers running a multi-window flow interactively first.

Author

...

Bhawana

Blogs: 77

  • Twitter
  • Linkedin

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.

Add to Google preferred sources

Summarise with AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Express Checkout 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