Issue
I am running some tests on my Flutter application, and I need a way to Tap on the Camera button to be able to take a picture, and then Tap on the Check Button (shown below) to validate it. I need a way to find the coordinates to tap on the location of the 2 buttons, or use await driver.tap(find.byValueKey('Key'));
by adding a testKey to the camera button's widget. I am not sure if driver.tap()
can be used to tap anywhere on the screen.
These are the two screenshots:
Solution
you're probably using ImagePicker, in that case have a look to this answer. There you can see that the author mocks the library, so you get the image without going into the camera.
Remember to add the file you want to load in pubspec.yaml and also, in my case I didn't need this line:
enableFlutterDriverExtension();
Answered By - samUser1
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.