How to use UIAutomation to select image from UIImagePickerController

前端 未结 3 904
逝去的感伤
逝去的感伤 2021-01-19 03:22

We are trying to get a UIAutomation test around a flow in our app where a user selects an image from a UIImagePickerController. All the automation works great, until we try

3条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-19 03:54

    So, I figured this out. Duh. I just needed to access the visible cells and send the tap to one of those. Works like a charm.

    window.collectionViews()[0].visibleCells()[0].tap();
    

    I hope this helps someone else!

提交回复
热议问题