Asif Nawaz
Asif Nawaz

Reputation: 80

In flutter_driver test, How can we automate the part where we upload images or videos?

I am writing integration test using flutter_driver, there is a test flow where I have to upload profile picture, is there any way we can automate this part. as I cannot find anything relevant to this on internet.

The specific part where I am stuck is this when I come to this screen I need to tap on Upload image button in below screen

This is screen with upload images button

After tapping this I go to gallery where I select a image and it gets uploaded.

gallery screen

This part where we have to select an upload an image is what I want to automate but I am stuck in this part, how can we achieve this.

Is this possible? please help, thanks

Upvotes: 0

Views: 774

Answers (1)

raj kavadia
raj kavadia

Reputation: 1073

Since the library or should I say intent is not part of your flutter activity, It would be very tricky or near to impossible to implement the task, but what you can do is you can create your own flutter page with the the slimier view and implementation inside the app(like gallery shown in screenshot) after that you can Implement that functionality. Here's one example of gallery application. You can modify according to your need and can do testing in that

https://github.com/aouahib/photo_manager_demo

It works on my machine. please let me know if it works on yours too. I think you are using android one phone. It should work on that.

Upvotes: 1

Related Questions