XCUI测试 - 无法滚动到可见

时间:2015-08-01 00:28:14

标签: ios swift xcode-ui-testing

在我的UI测试中,我有一些代码可以点击一个名为“blah”的按钮,这就是我得到的错误:

 Synthesize event
t =   267.72s             Scroll element to visible
t =   267.78s             Assertion Failure: UI Testing Failure - Failed to scroll to visible (by AX action) Button 0x7fc805a4f670: 
traits: 8589934601, {{264.0, 365.5}, {61.0, 60.0}}, label: 'blah', error: Error -25204 performing AXAction 2003

这可能是由什么造成的?

1 个答案:

答案 0 :(得分:0)

屏幕上看不到按钮。如果您观看测试运行,您会看到该按钮当前无法点按。您需要编写一些代码来滚动(滑动)到正确的位置。