Part of the EarlGrey test I'm writing includes saving a user's name. Here's the line of code:
[[[EarlGrey selectElementWithMatcher:grey_accessibilityID(@"textField")] atIndex:0] performAction:[GREYActions actionForTypeText:name]]
name
is saved to @"Thisisa UItest"
. Sometimes, the typed text is inaccurate: There are random letter capitalizations (I've put in a .lowercase
check as a work-around), as well as letters omitted sometimes. For example, "Thisisa itest"
would be typed. It's not consistent, but often enough to make the tests unreliable.
In setUp
, I have this argument that I read would make typing slower:
[[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
Let me know!
Edit: As per @Gautam 's request - XCode 8.2.1, iPad Pro, 9.7 inch simulator