mardi 22 mars 2016

How to check if a file exists in a specific folder of an android device

I am writing an automation test using python, where an android app records an audio and stores it in a specific directory within the internal storage (sdcard0) of the android device.

I need to check whether the recording (recordingX.mp3) actually exists with the same name within the specific directory or not.. If YES, the latest file should be given a new name.

def test_specific_folder(self): #code here

Can someone suggest me how to write a python test for this.

Aucun commentaire:

Enregistrer un commentaire