为了账号安全,请及时绑定邮箱和手机立即绑定

老师,麻烦你看看为我的监听生成的代码是这样的


    XCUIApplication *app = [[XCUIApplication alloc] init];

    XCUIElementQuery *usernameElementsQuery = [app.otherElements containingType:XCUIElementTypeStaticText identifier:@"userName"];

    [[[usernameElementsQuery childrenMatchingType:XCUIElementTypeTextField] elementBoundByIndex:0] tap];

    [[usernameElementsQuery childrenMatchingType:XCUIElementTypeTextField] elementBoundByIndex:0]    //怎么会跳出这样一句来啊,然后也不能把 xiaoming 纪录下来

    

    XCUIElement *textField = [[usernameElementsQuery childrenMatchingType:XCUIElementTypeTextField] elementBoundByIndex:1];

    [textField tap];

    [textField tap];

    [[usernameElementsQuery childrenMatchingType:XCUIElementTypeTextField] elementBoundByIndex:1]

    [app.buttons[@"log"] tap];

//我操作的这个过程,是可以正常NSLog我想打印的东西 alert 也可以正常的show


正在回答

举报

0/150
提交
取消
iOS9新特性之UITesting
  • 参与学习       10945    人
  • 解答问题       12    个

iOS9新特性:不需要我们手指反复点击,完成APP自动化测试

进入课程

老师,麻烦你看看为我的监听生成的代码是这样的

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信