내용으로 건너뛰기

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

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

관련 콘텐츠