试图断言表格视图中的第一个单元格包含字符串“first”:
EarlGrey.selectElement(with: grey_kindOfClass(UITableViewCell.self))
.atIndex(0)
.assert(grey_text("First"))
失败:
"Description Glossary" : {
"M" : "((kindOfClass('UILabel') || kindOfClass('UITextField') || kindOfClass('UITextView')) && hasText('First'))",
"E" : "<App.SubclassCell:0x7fa0c011d600; isAccessible=N; AX.id='Subclass Cell'; AX.frame={{0, 88}, {414, 56}}; AX.activationPoint={207, 116}; AX.traits='UIAccessibilityTraitButton'; AX.focused='N'; frame={{0, 0}, {414, 56}}; opaque; alpha=1; text=''>",
"S" : "kindOfClass('UILabel'), kindOfClass('UITextField'), kindOfClass('UITextView')"
},
"User Info" : {
"NSLocalizedDescription" : "Assertion with matcher [M] failed: UI element [E] failed to match the following matcher(s): [S]"
},
如何确认表格视图的特定索引包含某些文本?