How to test if a field has focus?

24 views
Skip to first unread message

Dino B.

unread,
Jul 12, 2017, 5:56:14 PM7/12/17
to calabash-android
In Calabash-android, I am trying to figure out that a field got focus.
The reason for this is I want to make sure keyboard is displayed when and entry field gets focus.
How do I do this, please explain.

Dino B.

unread,
Jul 13, 2017, 1:08:27 PM7/13/17
to calabash-android

Figured this out. Not exactly detecting field got focus but detecting that the keyboard is displayed which was my original question.When field is focused, keyboard is displayed and that is what I wanted to test in my Calabash test.

So, going to Calabash API for Android http://calabashapi.xamarin.com/android/, I see TextHelpers contains keyboard_visible? which can be called from ruby definitions to check for keyboard visibility.

Reply all
Reply to author
Forward
0 new messages