How to delete file from iOS simulator using appium

Hi, guys.
I have a problem. For my test I need to upload file (photo). I can not use standard photos from gallery, because I need file with size less than 10mb.
So I upload file to iOS simulator using pushFile() method.

But how I can delete this photo after test? Because every test run new file added to gallery as well.
I don’t see any deleteFile() method. Is this possible?


mobile: deleteFile

I did something similar about 5y ago. Instead of delete I checked number of files in photo folder. Default -> push, more files - means push was done before.

1 Like