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
1
vote
1 answer

Can't scroll up using EarlGrey

I have a `UICollectionView', in which I'm able to scroll downward, but can't scroll upward. I'm not sure if I'm missing something very simple - Here's the code below: (The formatting was weird, so here's a screenshot) The first block executes…
ArielSD
  • 829
  • 10
  • 27
1
vote
0 answers

Include of non-modular header inside framework module 'EarlGrey'

I tried to run the FunctionalTests that comes packed with the EarlGrey demo project. I ended up seeing this error. How do I resolve it.
Arjun Kalidas
  • 919
  • 9
  • 14
1
vote
1 answer

The nil check for presence of an element is not working as expected in functional test case

Suppose I am using a code snippet in setup() method just before running a test case like this: if EarlGrey().selectElementWithMatcher(grey_accessibilityID("TabBar-Navigation-Search")).assertWithMatcher(grey_sufficientlyVisible()) != nil { …
Arjun Kalidas
  • 919
  • 9
  • 14
1
vote
1 answer

My app shows a splash screen. How can I make my test wait for the main screen?

My app shows a splash screen. How can I make my test wait for the main screen to appear? Without waits my test fails immediately after app launch. // in application:didFinishLaunchingWithOptions: of my AppDelegate... SplashViewController *splashVC =…
jdis
  • 101
  • 5
1
vote
1 answer

How can I speed up my animations to make my EarlGrey test suite run faster

I saw the below API in GREYConfiguration that says that EarlGrey by default truncates CALayer animations more than 10 seconds - /** * Configuration for setting max allowable animation duration (in seconds) for any CALayer based * animation.…
gran_profaci
  • 8,087
  • 15
  • 66
  • 99
1
vote
2 answers

In EarlGrey, what's the non-polling way to wait for an element to appear?

Currently I wait for an element to appear like this: let populated = GREYCondition(name: "Wait for UICollectionView to populate", block: { _ in var errorOrNil: NSError? EarlGrey().selectElementWithMatcher(collectionViewMatcher) …
khandpur
  • 705
  • 3
  • 12
1
vote
1 answer

Test runs fine on iPhone 6s Plus but fails on iPhone 5s

I have a test that selects a particular feed in my app. It works fine on iPhone 6s but fails on iPhone 5s with element not found error. Upon further investigation it seems like the the feed is missing from the view hierarchy. I came up with a…
khandpur
  • 705
  • 3
  • 12
1
vote
2 answers

Can I see the exact UI hierarchy that EarlGrey uses to locate elements?

I am writing a test that fails with following error: Error Domain=com.google.earlgrey.ElementInteractionErrorDomain Code=0 "No element found." UserInfo={NSLocalizedDescription=No element found.} I can see in the generated screenshot that the…
khandpur
  • 705
  • 3
  • 12
1
vote
1 answer

Where do I find the xctest bundle for EarlGrey?

As the title indicates, what's the path of the XCTest bundle generated by EarlGrey framework?
Zheng Xu
  • 101
  • 6
1
vote
1 answer

"Use of unresolved Identifier 'grey_accessibilityID' "

"compilation errors" I was trying out EarlGrey on one of my apps as a POC. If that goes well, I was planning to use the same for the enterprise app that our company is working on. I setup the framework as described in the github page. The link is…
Arjun Kalidas
  • 919
  • 9
  • 14
1
vote
1 answer

How to confirm system alert like allow notification

If the app is installed at the first time, need to allow notification, how can I confirm it? Is someone encountered?
Paul
  • 93
  • 1
  • 4
0
votes
0 answers

How do I track if certain network events are fired or not using Earlgrey?

I noticed that in docs it did say that Earlgrey synchronises with all Network events so I assumed I could check if certain network events were being triggered or not (my use case). But I don't find any particular docs or mention on how to access…
0
votes
1 answer

Can EarlGrey be used as test tool only having ipa file?

Hello Stack Overflow community, I'm planning to develop a UI test automation for an iOS application. The problem is that I don't have access to the source code but only the finished ipa file of the app. Is there a possibility to write UI tests with…
0
votes
1 answer

EarlGrey - how to find any table view cell with a certain text inside

I have a custom UITableViewCell with a label inside. Both the cell and the label have an accessibility identifier, and I am trying to assert that in the UI there is at least one cell that contains a specified text. I am writing the assertion this…
Ramy Al Zuhouri
  • 21,580
  • 26
  • 105
  • 187
0
votes
2 answers

Tapping system alert using EarlGrey 2.0 & Swift

I'm trying to create UI tests for my app using EarlGrey 2.0 framework while using Swift language for those tests. However, I can't find a solution for tapping on a system alert, although EG 2.0 should support them. To be more specific, it is the…
redearz
  • 135
  • 1
  • 9