findsExactly function

Matcher findsExactly(
  1. int n
)

Asserts that the FinderBase locates the specified number of candidates.

Sample code

expect(find.text('Save'), findsExactly(2));

See also:

  • findsNothing, when you want the finder to not find anything.
  • findsAny, when you want the finder to find one or more candidates.
  • findsOne, when you want the finder to find exactly one candidates.
  • findsAtLeast, when you want the finder to find at least a specific number of candidates.

Implementation

Matcher findsExactly(int n) => _FindsCountMatcher(n, n);