-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement our own method to print finders #1353
Comments
@fylyppo, you implemented a simple version of this last week. Can you post it here? |
I have extended PatrolTester and NativeAutomator classes and then overridden methods I wanted to print from. class OwnPatrolTester extends PatrolTester {
OwnPatrolTester({
required PatrolTester patrolTester,
required super.nativeAutomator,
required super.config,
}) : super(tester: patrolTester.tester);
static const String phraseToSplitAt = ' (ignoring offstage widgets)';
void logStep(String action, Finder finder, [String? additionalText]) {
final finderTitleText = finder.toString().split(phraseToSplitAt).first;
print('Runner: $action $finderTitleText ${additionalText ?? ''}');
}
void logTap(Finder finder) {
logStep('Tapping', finder);
}
@override
Future<void> tap(
Finder finder, {
bool? andSettle,
Duration? visibleTimeout,
Duration? settleTimeout,
}) async {
logTap(finder);
await super.tap(
finder,
andSettle: andSettle,
visibleTimeout: visibleTimeout,
settleTimeout: settleTimeout,
);
}
}
I have added steps counter also.
|
Will be implemented as a part of #561, closing |
This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue. |
The Flutter's one prints too many info
The text was updated successfully, but these errors were encountered: