I am encountering points whereas attempting to push information to an iOS simulator utilizing Appium for check automation. Regardless of having UIFileSharingEnabled
set to true
in Data.plist, I am getting an ApplicationLookupFailed
error: org.openqa.selenium.WebDriverException: An unknown server-side error occurred whereas processing the command. Unique error: Didn't vend into the applying paperwork. Error: ApplicationLookupFailed
.
I’ve tried a number of approaches together with: utilizing totally different path codecs (@bundleId:Paperwork/
, Paperwork/
, and full paths), changing information to base64 earlier than pushing, verifying bundle ID and capabilities, and utilizing XCUITest’s cell instructions (cell: pushFile
). I’ve additionally confirmed the app is correctly put in and activated earlier than making an attempt the file switch. None of those options have resolved the difficulty – they both lead to the identical error or silently fail with out pushing the file. Has anybody efficiently carried out file pushing to iOS simulators with Appium, or discovered a workaround for this error?
Right here is the operate I’m utilizing to push the information to the simulator:
public byte[] pushFileToIOSDevice(String imagePath) {
// Assemble the distant path on the iOS gadget
String remotePath = "@com.lambdatest.proverbial:Paperwork/" + new File(imagePath).getName();
strive {
// Push the file to the iOS gadget
driver.pushFile(remotePath, new File(imagePath));
} catch (IOException e) {
// Throw a RuntimeException if an IOException happens
throw new RuntimeException(e);
}
// Retrieve the file from the iOS gadget as a byte array
byte[] fileBase64 = driver.pullFile(remotePath);
// Print the byte array to the console
System.out.println("Byte worth of file: " + Arrays.toString(fileBase64));
// Return the byte array
return fileBase64;
}