I'm developing an automation for an android mobile app using Appium and Python in emulator.
that app have document upload functionality. I'm able to upload the files into the Emulator storage using adb push
command but cannot upload the file which is in the android emulator storage to the corresponding android app and for the past few days I have tried several methods but are unable to complete that uploading functionality. Any help or guidance would be appreciated.
The things I have tried:
document = driver.find_element(by=AppiumBy.ID, value="com.indigo.habi:id/button_pick_from_document")
file_path = 'D:/me/projects/src/documents/statement.pdf'
push = driver.push_file('/sdcard/Download/statement.pdf',file_path)
document.send_keys('/sdcard/Download/statement.pdf')
This error shows while using send keys:
Message: Cannot set the element to '/sdcard/Download/bank_statement.pdf'.
Did you interact with the correct element?