1

After typing a text on some field (automatically with AndroidViewClient) the virtual keyboard remains on my device screen.
If I make a dump with the culebra script on this step I do not receive views related to this virtual keyboard but I receive views that I currently can't really see since the virtual keyboard hides them.
I wish AndroidViewClient "see"/distinguish the virtual keyboard.
And I need a help how can I close the virtual keyboard with the AndroidViewClient (what command should I use?)

UPD The included isKeyboardShown() method checks if Virtual Keyboard is shown, it works!
I wrote the method below.
It acts as a BACK key event.

def back(self):
    self.shell('input keyevent KEYCODE_BACK')  

That's all I was looking for!

Prophet
  • 32,350
  • 22
  • 54
  • 79

1 Answers1

1

If you want to dismiss the keyboard:

def dismissKeyboard(self):
    if self.isKeyboardShown():
        self.device.press('KEYCODE_BACK')
Diego Torres Milano
  • 65,697
  • 9
  • 111
  • 134
  • Thank you Diego, but I already found this resolution by myself as you may see in the **UPD** section of the question above ;) – Prophet Jun 02 '14 at 07:11
  • I noticed. You can answer your question too and accept your own answer so the question doesn't remain open. – Diego Torres Milano Jun 02 '14 at 12:40
  • I thought it is stupid to answer my own question. This site also asks me "are you sure ..." when I were trying to answer my own question. Is it bad practice to leave a question unanswered when the answer appear in the question after **UPD** label? – Prophet Jun 02 '14 at 12:45