tap method
Taps target — a Finder, a String (visible text), a Key, an
IconData, a Type, or a Target for the rest (a semantics label, a
tooltip, a scope, an index).
With the pointer of the device the scenario is staged on: a click of the scenario's mouse on a desktop — which stays where it clicked, so the control is hovered in the picture that follows — and a finger everywhere else. The same holds for every verb that presses.
dynamic is a deliberate exception to the house no-dynamic preference:
tap('NEXT') / tap(Icons.add) / tap(Keys.next) read too well to give
up, and the auto-write generator emits exactly the string form.
Implementation
Future<void> tap(dynamic target, {Shot? shot, Settle? settle}) => _step(
shot,
settle,
// The `At` forms of the SDK's verbs, never the finder forms: `_resolve`
// has already decided reachability — and loudly, where the SDK's
// `warnIfMissed` is a console line the flow sails past — and where the
// finger lands is [_aimFor]'s answer rather than a centre the SDK would
// take for itself.
() async {
var finder = await _resolve(target, 'tap');
var at = _aimFor(target, finder);
await _approach('tap');
await _pressAt(at, over: describeTarget(target));
},
verb: 'tap',
target: describeTarget(target),
);