这是我的代码-> https://github.com/patchthecode/XCTestBug
这是我的看法->
我正在尝试捕捉灰色视图。它包含一个标签Ll
和按钮11
此代码捕获视图
let p1 = NSPredicate(format: "label LIKE[c] %@","L1")
let views = app.otherElements.containing(p1)
此代码还正确捕获视图
let p2 = NSPredicate(format: "label LIKE[c] %@","11")
let views = app.otherElements.containing(p2)
但是此代码无法捕获任何内容
let p1 = NSPredicate(format: "label LIKE[c] %@","L1")
let p2 = NSPredicate(format: "label LIKE[c] %@","11")
let comp = NSCompoundPredicate(andPredicateWithSubpredicates: [p1, p2])
let views = app.otherElements.containing(comp)
我究竟做错了什么?