等待viewDidAppear:调用UICompatibilityInputViewController

时间:2016-09-02 14:58:42

标签: earlgrey

我有一个UITableView,它包含2个单元格,每个单元格包含2个UITextField' s。因为单元格是动态创建的,所以我使用辅助功能标签和值来选择元素,如下所示:

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")];

成人1字段位于第一个单元格中,成人2位于第二个单元格中。

&#34;测试&#34;出现在前2个文本字段中,在第一个单元格中没有问题。 EarlGrey然后给出以下错误:

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

我设法通过隐藏键盘(cmd +)来输入第二个单元格的第一个文本字段(辅助功能标签:&#34;成人2&#34;,值:&#34;名字) K)。但无论我显示/隐藏键盘多少,它都无法获得更多。

1 个答案:

答案 0 :(得分:1)

@JFoulkes现在已修复 - https://github.com/google/EarlGrey/pull/431