I have a UITableView which contains 2 cells, each contain 2 UITextField's. Because the cells are dynamically created I use accessibility labels and values to select the elements like so:
id<GREYMatcher> firstNameMatcher = grey_allOf(grey_accessibilityLabel(@"First name"),
grey_accessibilityValue(@"Adult 1"), nil);
id<GREYMatcher> lastNameMatcher = grey_allOf(grey_accessibilityLabel(@"Last name"),
grey_accessibilityValue(@"Adult 1"), nil);
id<GREYMatcher> firstNameMatcher1 = grey_allOf(grey_accessibilityLabel(@"First name"),
grey_accessibilityValue(@"Adult 2"), nil);
id<GREYMatcher> lastNameMatcher1 = grey_allOf(grey_accessibilityLabel(@"Last name"),
grey_accessibilityValue(@"Adult 2"), nil);
[[EarlGrey selectElementWithMatcher:firstNameMatcher]
performAction:grey_typeText(@"Test")];
[[EarlGrey selectElementWithMatcher:lastNameMatcher]
performAction:grey_typeText(@"Test")];
[[EarlGrey selectElementWithMatcher:firstNameMatcher1]
performAction:grey_typeText(@"Test")];
[[EarlGrey selectElementWithMatcher:lastNameMatcher1]
performAction:grey_typeText(@"Test")];
Adult 1 fields are in the first cell and Adult 2 in the second cell.
The "test" appears in the first 2 text fields, in the first cell no problems. The EarlGrey then gives the following error:
EarlGrey tried waiting for 5.0 seconds for the application to reach an idle state. It is now forced to clear the state of GREYAppStateTracker, because the test might have caused the application to remain in non-idle state indefinitely.
Full state tracker description: Waiting for viewDidAppear: call on this view controller. Please ensure that this view controller and its subclasses call through to their super's implementation
Waiting for CAAnimations to finish. Continuous animations may never finish and must be stop explicitly. Animations attached to hidden view may still be executing in the background.
Full state transition call stack for all elements:
<UICompatibilityInputViewController:0x7fe9394870d0> => Waiting for viewDidAppear: call on this view controller. Please ensure that this view controller and its subclasses call through to their super's implementation
I have managed to get it to type into the first text field of the second cell (accessibility label: "Adult 2", value: "First name) by hiding the keyboard (cmd+k). But it won't get any further, no matter how much I show/hide the keyboard.