简体   繁体   中英

Upload stock images Appium iOS Simulator

My application allows for users to upload a picture of themselves. The iOS simulator comes with stock images. How would I go about using one of those stock images for the image upload?

After clicking on the element that allows for users to upload images I receive the iOS popup:

iOS图片上传弹出窗口

I select "Album" but when using the Appium inspector it does not allow any access to these images, I am not able to select any (as seen in the screenshot)

鸦片检查员的屏幕截图

I doubt if its possible to parse this screen since its already other app: Photos app .

With Appium you can interact only with the app that is signed same certificate as WebDriverAgent. At least its valid for real devices, but since you are not able to parse with Appium Desktop my guess its still the same for simulator.

You might try to use TouchAction/tap by coordinates (less stable, but quick way to go) or have integrate image recognition library , eg sikuli in your code (more work, but clearly more stable) to select images in Photos app

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM