0

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.

JFoulkes
  • 2,429
  • 1
  • 21
  • 24
  • 1
    Do you have a recurring animation or so, that you're waiting for that might be causing this? UICompatibilityInputViewController usually comes from an accessory on a keyboard. Does it still happen if you remove the keyboard's accessory view. If so, then please file a bug at https://github.com/google/EarlGrey/issues, because it means that we're not syncing with the accessory view. – gran_profaci Sep 02 '16 at 21:55
  • Yep, removing the accessory view fixes the issue. The accessory view doesn't have animations in though? It has an observation through NSNotificationCenter which I had tried disabling, that doesn't fix it either – JFoulkes Sep 09 '16 at 12:23
  • I'd suggest filing a bug for this. This is an issue with EarlGrey. – gran_profaci Sep 09 '16 at 18:04

1 Answers1

1

@JFoulkes This is fixed now - https://github.com/google/EarlGrey/pull/431

gran_profaci
  • 8,087
  • 15
  • 66
  • 99