iOS XCUITEST how can I know file full path on DCIM?

Hello, I have a question about iOS(XCUITEST).

I know I can pull file by pull_file method on Webdriver.
However, I am not sure how I know the full path.

I have taken a snapshot on an app I test.
I know the snapshot file will be placed on ‘/DCIM/100APPLE/xxx.png’.
The ‘xxx’ part is randomly generated file name.
I want to pull this file but I don’t think I can know the file path.

Do you guys have any idea?

Thanks.

Is it the only file in that directory? If so you can use a wildcard in your programming language to find it. If it’s not the only file, can you delete all of these files before the test? This would ensure that it’s the only file and you can use a wildcard as above.

Otherwise, it’s going to be tough. Does GUI of your app give the file name? If so you could capture that and grab file. Maybe give some more details on the problem if none of the above applies.

I assume paths would be the same as while using ifuse.