Questions tagged [earlgrey]

EarlGrey is an iOS UI Automation Test framework by Google.

EarlGrey is a native iOS UI automation test framework that enables you to write clear, concise tests.

With the EarlGrey framework, you have access to enhanced synchronization features. EarlGrey automatically synchronizes with the UI, network requests, and various queues, but still allows you to manually implement customized timings, if needed.

EarlGrey’s synchronization features help ensure that the UI is in a steady state before actions are performed. This greatly increases test stability and makes tests highly repeatable.

EarlGrey works in conjunction with the XCTest framework and integrates with Xcode’s Test Navigator so you can run tests directly from Xcode or the command line (using xcodebuild).

It's available on GitHub here: https://github.com/google/EarlGrey

96 questions
0
votes
0 answers

Unable to test interaction on html ui elements inside a WkWebView in a hybrid iOS app, using EarlGrey

I have a hybrid iOS application. One of the view's is a WkWebView which loads a html file. To test this app, I have used Google's EarlGrey framework. It works great with iOS's native UI elements. However, I am unable to test the UI elements in the…
rlr
  • 320
  • 2
  • 11
0
votes
0 answers

How can I use GreyAssert in element's existence/visibility check?

I just started using EarlGrey, and now I try to realize construction which will make screenshot if the test fails on Assert. It is rather simple, e.g. when I check if the keyboard is visible, because GREYKeyboard.waitForKeyboardToAppear() returns…
N13
  • 91
  • 7
0
votes
1 answer

If/While loop with EarlGrey from Swift

Iam a beginner in EarlGrey. Before i used them, I used swift. Now, is my problem I have a while loop, I don't know how I can make a while loop in EarlGrey. I want this while loop written in EarlGrey : if XCUIApplication().otherElements[XYZ].exists {…
Saintz
  • 69
  • 7
0
votes
0 answers

Contraint Failed Exception

My Earlgrey tests are working fine on iPhone 6s plus simulator, but when I run the same test on iPhone 6 simulator, it gives constraintFailedException. This is my code: EarlGrey.select(elementWithMatcher: grey_accessibilityID("passwordTextField")) …
anfa hamid
  • 73
  • 1
  • 9
0
votes
1 answer

Navigation Issue in EarlgreyUI iOS Testing

Below is my code for earlGrey test EarlGrey.select(elementWithMatcher: grey_accessibilityID("userNameTextField")) .atIndex(0).perform(grey_typeText("freshaccount@dayrep.com")) EarlGrey.select(elementWithMatcher:…
anfa hamid
  • 73
  • 1
  • 9
0
votes
1 answer

EarlGrey launches APP with black screen

After successfully adding EarlGrey to existing project (using CocoaPods) project is successfully built (both "for running" and "for testing"). The problem is that if I run the app from XCode it runs as expected. If I run it as a test only splash…
Karol Gil
  • 95
  • 3
  • 8
0
votes
1 answer

iOS Earl Grey - select missing argument

I added EarlGrey to my iOS project via CocoaPods. I created new target, as explained here: https://github.com/google/EarlGrey/blob/master/docs/install-and-run.md. My problem is, that following this instruction, simple EarlGrey swift test is…
Karol Gil
  • 95
  • 3
  • 8
0
votes
1 answer

How To Use tapAtPoint In EarlGrey

I'm writing tests where I want to delete a tableViewCell by swiping it, exposing the red "Delete" editing action. I can swipe the cell fine, but the problem arises when I try to use tapAtPoint. This is straight from the GREYActions.h: * @param…
ArielSD
  • 829
  • 10
  • 27
0
votes
1 answer

Does Earlgrey for iOS support UI elements outside of the test app?

I am totally new to iOS, Xcode and automated test frameworks. I would like to confirm 3 things about iOS testing using EarlGrey: It cannot access elements outside of the test app. For example, the test app cannot press the 'HOME' key It does not…
largotiticaca
  • 383
  • 1
  • 4
  • 13
0
votes
2 answers

EarlGrey Freezes Animation And Doesn't Call Callback

There is a method with an asynchronous block as a parameter. The first time the app runs, this method is called, and there is an animation that covers the entire screen. The method is making a network call that can take a pretty long time, around 7…
ArielSD
  • 829
  • 10
  • 27
0
votes
0 answers

actionForTypeText Not Always Accurate In EarlGrey

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…
ArielSD
  • 829
  • 10
  • 27
0
votes
1 answer

(Swift, EarlGrey) move slider to the middle

I'm writing some tests and I need to go to the middle of a slider. I would like to get minimumValue and maximumValue of the slider, like on a picture below: These values may change so every time I need to get them in my code. Later, I just want to…
Tomas
  • 129
  • 2
  • 14
0
votes
2 answers

Is there a way to get the number of cells in a table view?

In case if we are to take in all the cells in a TableView into an array and iterate through it to click on elements. I am looking for a solution in swift.
Arjun Kalidas
  • 919
  • 9
  • 14
0
votes
1 answer

Waiting for viewDidAppear: call on UICompatibilityInputViewController

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 firstNameMatcher =…
JFoulkes
  • 2,429
  • 1
  • 21
  • 24
0
votes
1 answer

EarlGrey GREYCondition waitWithTimeout:15 does not wait for 15 seconds

I wrote a test that is supposed to wait for 15 seconds before evaluating a condition. It currently waits much shorter, and goes to the evaluation block right away, producing an error. The seconds parameter after: waitWithTimeout seems to be…
FranticRock
  • 3,233
  • 1
  • 31
  • 56