Ramanathan s
Ramanathan s

Reputation: 36

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

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?

Upvotes: 1

Views: 395

Answers (1)

Kaushik Chandru
Kaushik Chandru

Reputation: 17762

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));

Upvotes: 1

Related Questions