# Flutter test: Expected: exactly one matching candidate Actual: _TextFinder:<Found 0 widgets with text "Hello">

**Code:** `Expected: exactly one matching candidate, Actual: found 0 widgets` · **Category:** Flutter / Dart · **Seen on:** Flutter

A widget test looked for a widget that is not currently in the tree.

## Meaning

Common causes: the widget is built after an async gap and needs `await tester.pump()`, it is off-screen in a list (use `scrollUntilVisible`), the text differs slightly, or the page wasn't navigated to. Print the tree with `debugDumpApp()` to see what exists.

## Common causes

- Missing `await tester.pump()` / `pumpAndSettle()` after an action
- Widget built lazily and off-screen
- Text/keys differ
- Navigation not performed
- Dialog or overlay not pumped

## Quick fix

1. Add `await tester.pumpAndSettle();` after taps and futures
2. Use `find.byKey` for stable selection
3. Scroll to the item with `tester.scrollUntilVisible`

## Detailed fix by platform

### Flutter

1. `debugDumpApp();` inside the test prints the widget tree

## How to diagnose

1. **Pump** — Done after the action?
2. **Visible** — In viewport?
3. **Finder** — Correct text/key?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/flutter/finder-found-zero-widgets)
