0

Using Espresso can we validate which type of Soft Keyboard appears when we select a particular input field. For Example let we select Mobile Number - EditText it must display numeric keyboard. Can we validate it with Espresso?

Krishnakant
  • 1,453
  • 3
  • 18
  • 30
  • why would you like to check with espresso what kind of keyboard you use? To make sure you have number keyboard decalre it in EditText vars as it is explained here: http://stackoverflow.com/questions/15647327/phone-number-formatting-an-edittext-in-android – piotrek1543 Aug 09 '16 at 23:38

1 Answers1

5

Espresso just run on Single application. All view must belong to current activity. Since Keyboard is belong to System, Espresso is unable to check it. You could use it uiautomator inside your Espresso test case! I don't try it yet but I think it could be help.

ThaiPD
  • 3,503
  • 3
  • 30
  • 48