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?
Asked
Active
Viewed 223 times
1 Answers
1
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));

Kaushik Chandru
- 15,510
- 2
- 12
- 30
-
yes currently using timer and manual clicks. Its fine for pop-up, what about selecting an image from native gallery, or taking picture using camera or uploading a file from file manager. Doing all those steps manually is not an efficient way. And simulating the tap on specific location also not working when app is going to native page, tapAt function is working only within flutter pages. – Ramanathan s Aug 24 '22 at 06:13
-
Yeah thats an expected behaviour. You can try simulating click on a specific position. I mean not by finding by type or key. Just position – Kaushik Chandru Aug 24 '22 at 06:22