0

Using google espresso I am trying to send emails using Gmail app.

In Gmail app how to access resource id for Send button: com.google.android.id/send

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62

1 Answers1

0

nowadays it's impossible. Check my answer on similar issue: Espresso test for Notification to showing up

Espresso UI test framework doesn't see more than actual View. I doubt seriously that you can check any notification with Espresso.

For this purpose use another Googles testing framework uiautomator, which is described as:

UI Automator is a UI testing framework suitable for cross-app functional UI testing across system and installed apps.

Here you would find how to use it with Espresso: http://qathread.blogspot.com/2015/05/espresso-uiautomator-perfect-tandem.html

More information:

Visit also: Android Testing: UIAutomator vs Espresso

As syou would see the best way to do it is using both of Espresso and uiautomator testing frameworks.

Community
  • 1
  • 1
piotrek1543
  • 19,130
  • 7
  • 81
  • 94