Xcode UI test - UI Testing Failure - Failed to scroll to visible (by AX action) when tap on Search field "Cancel' button

前端 未结 8 1483
时光取名叫无心
时光取名叫无心 2020-12-04 08:32

I am trying to dismiss the search field by tapping \'Cancel\' button in search bar.

The test case is failing to find the cancel button. It was working fine in Xcode

8条回答
  •  独厮守ぢ
    2020-12-04 08:59

    For me, the root cause was that the objects I wanted to tap

    • have been set to hidden (and back)
    • have been removed and re-attached

    In both cases the isAccessibilityElement property was false afterwards. Setting it back to true fixed it.

提交回复
热议问题