跪拜 Guibai
← Back to the summary

Screenshot Says Success, List Says No: The UI Automation False Positive

[AI Efficiency] UI automation page screenshot looks successful, but the business result didn't happen. Should you file a defect or blame the script?

Author: Tester Zhou Zhou

When doing UI automation with AI/browser automation, there is a pitfall that is especially frustrating:

The page screenshot looks successful, but the business result didn't happen.
Should you file a defect or blame the script?

This post uses a real demo from my inventory management system to illustrate this pain point and its cause.


1. The Pain Point: Screenshot Says Success, List Says Not

When using ego lite to run the "New Product" flow in the inventory system, here's what happened:

  1. The modal opens
  2. The name, description, and price appear filled in the screenshot
  3. After clicking "OK", the new product is consistently absent from the list

If a person only looks at the middle "filled in" screenshot, it's easy to draw one of two wrong conclusions:

Pain Point Screenshot 1|The modal is open

Pain Point Screenshot 2|The screenshot looks like it's filled in (the most misleading)

Pain Point Screenshot 3|Checking the list, it turns out it wasn't created

The pain point lies in the discrepancy between Screenshot 2 and Screenshot 3: visual success ≠ business success.


2. Conclusion (Reading This Section Is Enough)

Conclusion 1: This is more of a script bug, not a product bug.
In the first round, "not created" was mainly because the automation itself didn't do it right: the modal wasn't ready, it filled the wrong search box, the fields weren't aligned, and it only used screenshots for validation.

Conclusion 2: The system itself can create the product.
After finding the correct fields and waiting for the modal properly:

Conclusion 3: Don't use "screenshot has text" as the sole evidence.
For write operations, at least check three things: Is the modal correct → Did Network return 201 → Does the list contain the record?

Mnemonic:

Screenshots are for storytelling; Network + List are for judging truth.


3. Detailed Process

1. Why the first round experienced "fake success"

Actual Pitfall Why the screenshot looked successful
Started filling before the modal was ready Page state judged incorrectly
Name written into the top "Search product name" box The search box also has text, so it looks "filled"
Placeholder didn't align with the modal fields Some boxes empty, some filled wrong
Didn't check POST /api/products No API evidence, yet still said "created"

Corresponding to the three pain point screenshots: Screenshot 2 looks good, Screenshot 3 slaps you in the face.

2. What the frontend submission actually checks

The modal is Vue + Ant Design Vue: v-model binds formData, and after confirming, it calls api.post('/products', formData).

So:

3. Controlled experiment: After finding the correct fields

Same login state, open the new product modal, both groups go through the "correct fields".

A. Hard insert value (correct field found)

Result: POST /api/products → 201, list shows deep-fake-751450.

B. Playwright standard fill

Result: same 201, list shows deep-pw-751460.

4. A table to understand

Method Screenshot/DOM has text POST 201 List appears
First round exploration (wrong field/timing) Looks like it does No reliable evidence No
Hard insert (field found) Yes Yes Yes
Playwright fill Yes Yes Yes

Reading the table: The right two columns determine if it was created; the left only shows "it's visible on the page."

Raw data: 深挖取数/deepdive-result.json

5. How to validate from now on (copy this)

  1. Wait for the modal to be visible
  2. Fill with real selectors (placeholder / testid / label)
  3. Check Network (method, path, status code, request body)
  4. Check the list/detail for the record

If any step is missing, don't rush to say "success" or "the system has a bug."


4. How This Connects with Preceding and Following Articles

Article What it answers
Main article On-site feeling: looks like it was filled, but doesn't seem created
This article This is a script bug; how to prove with images + API; how to validate in the future
Comparison article After fields are correctly written, ego / Playwright both get 201, difference mainly in speed
Comments

Top 1 from juejin.cn, machine-translated. The original thread is authoritative.

去吧波波鸟

Visual success does not equal business success, that's so true. The part about filling into the search box is especially realistic; automation just loves doing that kind of thing. From now on, acceptance checks that only look at screenshots really need to change.