Hi, I want to add a photo from my laptop to an iOS real device native APP Photos during the appium test. I manage to do so for android with following push file command: driver.pushFile("/mnt/sdcard/Automation/demophoto.png", imageFile);
I have also found instructions for iOS simulator. But when I try this on a iOS real device, I tried driver.pushFile("demophoto.png", imageFile);
The command seems to be executed, but nothing shows up in the Photos app.
I assume such feature is restricted on real devices by Apple. Adding an image to photos app is not only about adding a file to a folder, but its metadata should also be added to the internal database.
Hello
I am new to Appium could someone please help me on below test:
trying to copy image file from my project/ resources to IOS real device Files folder
below is my code
File img = new File(assetDir.getCanonicalPath(),“sampletextfile”);
Below is the error from Appium logs:
Calling AppiumDriver.pushFile() with args: ["@com.apple.DocumentsApp:documents/sampletextfile",“dGVzdCBkcml2ZXIucHVzaGZpbGU=”,“ee149444-75ae-40ac-8d6a-9c892e22bf81”]
[XCUITest] Executing command ‘pushFile’
[XCUITest] Parsed container type: documents
[W3C (ee149444)] Encountered internal error running command: Error: Failed to vend into the application documents. Error: InstallationLookupFailed
[W3C (ee149444)] at HouseArrestService.vendDocuments (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-ios-device/lib/house-arrest/index.js:68:13)
[W3C (ee149444)] at createAfcClient (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/commands/file-movement.js:37:12)
[W3C (ee149444)] at createService (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/commands/file-movement.js:64:21)
[W3C (ee149444)] at pushFileToRealDevice (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/commands/file-movement.js:254:35)
[W3C (ee149444)] at XCUITestDriver.pushFile (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/commands/file-movement.js:478:7)
[HTTP] <-- POST /wd/hub/session/ee149444-75ae-40ac-8d6a-9c892e22bf81/appium/device/push_file 500 169 ms - 831
Thank you @Aleksei , I have followed the doc but unable to install ifuse am getting error ifuse is disabled requires fuse . In my system though macfuse and fuse were already installed.
Do I need to install any dependencies for this or any set up ?