跳至内容

Not able to find the extra-data on iOS device

0

https://repost.aws/questions/QUajkjXJdyRiCoFsAwUmEkzA/access-file-on-android-ios-device-uploading-data-using-type-external-data-and-then-schedule-run

Regarding this For iOS, you can use NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) to get the path to the Documents directory, then append the path to your extra data files.

Im using Appium Robot framework, i have uploaded the extra-data which include json file, But im not able to find it on the device. Please suggest As per the documentation it should be under Documents/ but that is not the case, In our app we have upload functionality through which we can upload any file, so im using extra-data to upload specific json file and want to upload this file , but the file is not present on the iOS device

已提问 4 个月前38 查看次数
1 回答
0

When working with extra files in AWS Device Farm for iOS devices, the location of these files depends on how they were packaged and uploaded.

For iOS tests, extra files that you've uploaded as "external data" are not automatically placed in the Documents directory. Instead, if you've uploaded your test package as an IPA file, your extra files would be located inside the .app directory within the Payload directory.

Specifically, you would find your extra files at a path similar to: /tmp/Payload/*.app/extra_file

If you're using Appium with Robot Framework, you can access these files by using the correct path. You might need to unzip your test package first using:

unzip $DEVICEFARM_TEST_PACKAGE_PATH -d /tmp

Then your files would be accessible at the path mentioned above.

For iOS applications, if you need to access these files from within your app, you would need to copy them to a location accessible by your app, such as the Documents directory. You can do this as part of your test setup.

If you're specifically trying to upload a JSON file through your app's upload functionality, you'll need to first locate the file in the test package location and then use Appium commands to interact with your app's UI to perform the upload.

Remember that iOS has stricter file system access controls compared to Android, which might be why you're having difficulty finding your files in the expected location.
Sources
Adding extra files to your test package in Device Farm - AWS Device Farm
Get high quality with correct frame rate video recording on iOS | AWS re:Post
Accessing Gallery of an iPhone for Test Videos in Appium via AWS: Is It Possible? | AWS re:Post

已回答 4 个月前
AWS
支持工程师
已审核 4 个月前
  • How can i copy the file to a location accessible by our app, such as the Documents directory, as the device farm container has restricted the copy and other related operation, so if the extra-data is part of test package then how i can placed or copy it to the required location in order for my app to access it

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。