How to automate native features (like take image in camera) or pop-ups (tapping on allow or deny) in flutter integration testing

Viewed 37

Every time I log in to my flutter app using integration test script "Allow user to access contact" pop up will be displayed which is a native component. I could not access or tap those pop ups using flutter test driver. Is there a way to automate those process or any work around for it?

1 Answers

Native pop ups cant be handled in integration test except to simulate a tap at a specific position.. or may be give a timer for you to manually click on that pop up..

await tester.pump(Duration(seconds: 15));
Related