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
0 answers

Assert the label in a UITableViewCell with EarlGrey 2

Trying to assert that the first cell in the table view contains the string "first": EarlGrey.selectElement(with: grey_kindOfClass(UITableViewCell.self)) .atIndex(0) .assert(grey_text("First")) Failure: "Description Glossary" : { "M" :…
Huy-Anh Hoang
  • 777
  • 6
  • 24
1
vote
0 answers

Errors running UI Test after EarlGrey Installation

I'm currently unable to build my UITests after completing the EarlGrey 2 installation steps. I get the following: /Users/morgan/Documents/WineSpectator/git/WineRatingsPlus/EarlGrey/CommonLib/DistantObject/GREYHostApplicationDistantObject.h:23:9:…
1
vote
0 answers

Unable to scroll using EarlGrey scroll actions

I am unable to scroll on the initial state of a tableview. When reaching the page with a long table, I attempt to scroll down using scrollInDirection() but I receive an error (cannot scroll, scrollview is already at edge). If I perform a swipeUp()…
wcchamp
  • 11
  • 2
1
vote
0 answers

Earlgrey error of NoMatchingElementException

I am using following code in swift @IBAction func letsPlay(_ sender: UIButton) { if(input.text == "xxx@123") { DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(4), execute: { let storybord = UIStoryboard(name:…
1
vote
1 answer

Earlgrey is slow when accessing NavBar/TabBar Items

As EarlGrey runs in the process and there is no install/uninstall process involved as in XCUI test framework, I expected tests to run faster but I noticed it is almost the same speed as XCUI test framework. Any reasons? It's very slow to get TabBar…
user1165756
  • 375
  • 3
  • 11
1
vote
2 answers

iOS: Earlgrey/Detox error after running the same test twice

Running the same test twice fails the second time. Steps to Reproduce: This test passes: describe('Login', () => { beforeEach(async () => { await device.reloadReactNative(); }); it('should not login', async () => { await…
Gianfranco P.
  • 10,049
  • 6
  • 51
  • 68
1
vote
1 answer

How does framework like KIF or EarlGrey access the running application?

Usually in iOS unit tests, we create new objects, call the method we wanna test, and then validate the results. This is a stand-alone procedure. The test cases always start running with the app instance but we do not access that instance…
Wizard
  • 389
  • 1
  • 2
  • 12
1
vote
1 answer

Where can I find screenshots of failed tests with EarlGrey?

I'd like to add screenshots to CI-reports of my EarlGrey tests. I know I can use GREYScreenshotUtil.takeScreenshot() and GREYScreenshotUtil.saveImage to create custom screenshot and specify its name and path to save, but it helps only in particular…
N13
  • 91
  • 7
1
vote
2 answers

How to check whether the keyboard is shown or not?

I'm using EarlGreyfor automated UI testing on an iOS project. I want to check whether the keyboard is shown or not after swiping away on the screen. I've seen the header file in EarlGrey framework named GREYKeyboard.h with a function named…
S.Boy
  • 21
  • 4
1
vote
0 answers

EarlGrey:Failed to execute block because idling resources below are busy

I ran the following commands and it says failed to execute block because idling resources below are busy. EarlGrey.select(elementWithMatcher: grey_accessibilityLabel("First Label")).atIndex(0).perform(grey_tap()) EarlGrey.select(elementWithMatcher:…
1
vote
1 answer

Automated tests for audio on iOS

I am setting up automated (e2e) tests (using Detox) for an iOS app. Part of the app records and processes audio input. In order to fully test the app I need to be able to simulate audio input. Ideally by playing back a specific audio file. But it…
Adamski
  • 3,585
  • 5
  • 42
  • 78
1
vote
1 answer

Tap UITabBarItem with EarlGrey

Im running into a problem trying to write UI tests using Earl Grey, specifically how to perform a tap on a certain UITabBarItem. I noticed that tab bar items don't allow for accessibility ID's and labels to be set in the storyboard, and I've tried…
raisedandglazed
  • 804
  • 11
  • 29
1
vote
1 answer

Dismissing UIAlertController in Earl Grey

I've been having a hard time trying to dismiss UIAlertControllers in Earl Grey. I followed the example in this example, but I cannot dismiss the alerts by using grey_text. I'm using Swift to write the tests where I need to dismiss the alerts, and…
Justin C
  • 11
  • 2
1
vote
2 answers

How to handle a PBXCp error with EarlGrey?

I keep getting this error recently when I did a pod update, pod install and then executed my test cases using EarlGrey. And when I try to resolve the path with terminal, I do not have anything in that path, nor do I have a EarlGrey-1.0.0 in my…
Arjun Kalidas
  • 919
  • 9
  • 14
1
vote
0 answers

An error occurred while processing the pre-install hook of the Podfile. undefined method `install_gem'

I am getting an error with pod install/update. I am trying have a look at EarlGrey demo. Following is the content of podfile. post_install do |installer| # Always install the newest EarlGrey gem require 'rubygems/command_manager' …
san
  • 3,350
  • 1
  • 28
  • 40