I am unable to select the particular email for google sign-in for testing
this is the error that im facing.
_AssertionError ('package:patrol/src/custom_finders/patrol_tester.dart': Failed assertion: line 131 pos 7: 'nativeAutomator != null': NativeAutomator is not initialized. Make sure you passed
nativeAutomation: true
to patrolTest(), and that you're not initializing any bindings in your test.)
this is the code snippet
void main() {
patrolTest(
'signs up',
(PatrolTester $) async {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
configureDependencies(testing: true);
// runZoneGuarded(() => runApp(MyApp));
await $.pumpWidget(const MyApp());
final getStartedButton = find.byKey(const Key("getStartedButton"));
await $.tap(getStartedButton);
await $.pumpAndSettle();
await $('LOGIN WITH GOOGLE').tap();
await $.native.tap(Selector(text: 'Neel Kothari'));
await $.pumpAndSettle();
},
);
}
If you want to use Patrol's native automation feature, you have to set the
nativeAutomation
argument totrue
in call topatrolTest()
:BTW, don't call
IntegrationTestWidgetsFlutterBinding.ensureInitialized()
– Patrol has its own binding which is already initialized at this point, and calling this line will conflict with Patrol's binding.