0

i want to open "Choose input method" popup menu from settings application. Using monkeyrunner touch command, the screen is taped, while the menu is not opened.

Here is the reproduce steps:

  1. environment: emulator (android sdk 4.1)
  2. Go to System settings -> Launguage & input view
  3. try to tap the text "Default" using monkeyrunner touch command

python code:

    device = MonkeyRunner.waitForConnection(10, "emulator-5554")
    device.touch(83, 486, MonkeyDevice.DOWN_AND_UP)

Actually result:

  1. the screen is taped, but the popup menu is not opened. Also reproduced with tap the text "Launage".
  2. And i tried with android sdk 2.3.3 for this issue, the submenu for "Default" and "Language" could be opened.
  3. if executed the adb command "adb shell input tap 83 486" on sdk 4.1, the menu could be opened.

Any ideas for this issue?

andrew
  • 33
  • 4

1 Answers1

0

If you are using monkeyrunner to opne System setting -> Language and input view then you should place some *MonkeyRunner.sleep(x) along the way (where x is the time in seconds).

This way you'll make sure that the UI elements are created properly. If you do not place sleep(x) statements, the script will touch/ press without any lag/ timeout. But the android UI needs some time to create the views and other elements and make then functional.

Gabriel Porumb
  • 1,661
  • 1
  • 12
  • 21