按照您说的进行测试 生成的测试代码和您的不一样 我是xcode7.3.1 明明进行输入了 但是测试自己运行的时候就没有在输入框中输入任何值
let app = XCUIApplication()
let elementsQuery = app.otherElements.containingType(.StaticText, identifier:"账号:")
elementsQuery.childrenMatchingType(.TextField).matchingIdentifier("请输入文字").elementBoundByIndex(0).tap()
elementsQuery.childrenMatchingType(.TextField).matchingIdentifier("请输入文字").elementBoundByIndex(0)
let textField = elementsQuery.childrenMatchingType(.TextField).matchingIdentifier("请输入文字").elementBoundByIndex(1)
textField.tap()
textField.tap()
elementsQuery.childrenMatchingType(.TextField).matchingIdentifier("请输入文字").elementBoundByIndex(1)
app.buttons["登陆"].tap()