0
這裏是我的代碼 - >https://github.com/patchthecode/XCTestBugXCUItest不流通,即使斷言似乎有效
這是我的觀點 - >
我試圖捕捉灰色視圖。 它包含一個標籤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)
我究竟做錯了什麼?