You can clone with
HTTPS or Subversion.
I have a UILabel contained within a UIView (within the top UIView within a UIViewController). If I wait for the UILabel based only on its accessibility label, the test passes. If I wait for the accessibility label and value, the test fails.
The problem is that the value being tested for doesn't match the value of the UILabel element. The problem is that this test is never executed on the element. For debugging, I added this log statement to line 87 of UIView-KIFAdditions.m:
NSLog(@"label: '%@' =? '%@', values: '%@' =? '%@'", element.accessibilityLabel, label, element.accessibilityValue, value);
When this step is run I see the element being tested in the line above:
[scenario addStep:[KIFTestStep stepToWaitForViewWithAccessibilityLabel:@"top label"]];
When this step is run I do not see the element being tested:
[scenario addStep:[KIFTestStep stepToWaitForViewWithAccessibilityLabel:@"top label" value:@"Online" traits:UIAccessibilityTraitStaticText]];
In storyboard, Accessibility is enabled and the "Static Text" trait is checked, as is "User Interaction Enabled".
So the problem is that the UILabel had userInteractionEnabled = YES, but the containing view did not. Should this be considered a bug or correct behavior? On one hand an element with userInteractionEnabled = NO is not "accessible", but on the other I'm calling stepToWaitForViewWithAccessibilityLabel: not stepToWaitForTappableViewWithAccessibilityLabel:
Closing all KIF 1 issues as it will no longer be maintained.