app.buttons.elementBoundByIndex(9).tap()
app.buttons["New Sale"].tap()
/*this is the textfield i am trying to tap*/
app.textFields.elementBoundByIndex(0).pressForDuration(2)
错误是:
<unknown>: UI Testing Failure - Failed to scroll to visible (by AX action)
TextField 0x7fa3c96c02b0: traits: 146029150208, {{272.0, 315.0}, {480.0, 40.0}},
placeholderValue: 'Select',
error: Error -25204 performing AXAction 2003
答案 0 :(得分:0)
我首先滚动到元素,然后点击:
解决了这个问题let textField = app.textFields.elementBoundByIndex(0)
app.scrollToElement(textField)
textField.tap()