I have written a script in robotium which works just fine, but our application is designed in such a way that it has to interact with the Native android application which cannot be resigned. I have to click a button on the native app which cant be done through robotium. So i wanted to know if i can add a command of monkey runner in my script to click on the app.
Share
Execute above line and stop when you get focus on your desired button
Then execute bellow line, to click on button
For example you have 3 Objects On Screen:
[1] username [ text box ]
[2] password [ text box ]
[3] Submit [ Button ]
If you want to Click on ” Submit ” button using “robotium” then
generally we send keyevents from munkey code, so i suggest you above code.
Note:
KEYCODE_DPAD_DOWN [ Constant Value: 20 (0x00000014) ]
KEYCODE_ENTER [ Constant Value: 66 (0x00000042) ]
Pasted from http://developer.android.com/reference/android/view/KeyEvent.html
I tested this on my automation application.
I hope this will help you, Thanks.