highlightRectForStep method

Rect? highlightRectForStep(
  1. TestStepExecutor executor,
  2. TestStep step, {
  3. bool forFailure = false,
})

Implementation

ui.Rect? highlightRectForStep(
  TestStepExecutor executor,
  TestStep step, {
  bool forFailure = false,
}) {
  if (!shouldHighlightStep(step, forFailure: forFailure)) return null;
  final finder = _highlightFinder(executor, step);
  if (finder == null) return null;
  final requireHitTestable =
      isUserActionStep(step) && !isTextMutationStep(step);
  final rect = executor.assertions.rectForVisuallyActionable(
    finder,
    requireHitTestable: requireHitTestable,
  );
  if (rect != null) return rect;
  if (!requireHitTestable) {
    return executor.assertions.rectForVisuallyActionable(finder);
  }
  return null;
}