+ (id)stepToCheckTextWithAccessibilityLabel:(NSString *)text accessibilityLabel:(NSString *)accessibilityLabel traits:(UIAccessibilityTraits)traits;
{
return [KIFTestStep stepWithDescription:[NSString stringWithFormat:@"Match string \"%@\" against view with accessibility label \"%@\"", text, accessibilityLabel] executionBlock:^(KIFTestStep *step, NSError **error)
{
UIAccessibilityElement *element = [self
_accessibilityElementWithLabel:accessibilityLabel
accessibilityValue:nil
tappable:NO
traits:traits
error:error];
if (!element)
{
return KIFTestStepResultWait;
}
KIFTestCondition([text isEqualToString:[element text]], error, @"Text doesn't match.");
return KIFTestStepResultSuccess;
}];
}
Hope this may help