Questions tagged [monkeyrunner]

Monkeyrunner is tool from Android SDK which provides an API for writing programs that control an Android device or emulator from outside of Android code.

Monkeyrunner is a host side application to control a monkey instance on a device.
Monkeyrunner provides some useful helper functions to control the device as well as various other methods to help script tests.

The monkeyrunner tool provides an API for writing programs that control an Android device or emulator from outside of Android code.
With monkeyrunner, you can write a Python program that installs an Android application or test package, runs it, sends keystrokes to it, takes screenshots of its user interface, and stores screenshots on the workstation.

The monkeyrunner tool is primarily designed to test applications and devices at the functional/framework level and for running unit test suites, but you are free to use it for other purposes.

476 questions
0
votes
1 answer

Get page source of a web page running in the emulator while the script used is running in the local machine?

Here's what I need to do, I need to get the page source of a web page running inside the emulator. The script that is going to perform the task is running in the local machine. The script is made using monkeryrunner. any ideas? thanks!
srh snl
  • 797
  • 1
  • 19
  • 42
0
votes
3 answers

How to enter values to a text field using monkeyrunner

I am trying to enter some text to a text field in my android application using Monkeyrunner. I wrote the code like…
user1722227
  • 21
  • 1
  • 7
0
votes
3 answers

Taking screenshots for battery analysis on android

I'm doing a battery analysis of my app, I'm left with these options only: Disable USB charging on the device, which I have not been able to do yet and take screenshot using monkeyrunner of Settings -> Battery screen Without the USB cable attached,…
Rohan
  • 1,705
  • 7
  • 17
  • 38
0
votes
2 answers

How can I clear the MonkeyRunner application cache?

I need to run a test suite using monkeyrunner. Is there a way to clear the app cache after running some tests other than monkey.device.uninstall()?
0
votes
1 answer

the menu is failed to opened using monkeyrunner touch command

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: environment: emulator (android sdk 4.1) Go to System…
andrew
  • 33
  • 4
0
votes
1 answer

How to click on a View which contains specified text using monkeyrunner and Android ViewClient?

I'm trying to simulate a click on an Android tablet using monkey runner and Android ViewClient. I want to click on a region/ view which has specific text. Here's an example of what i'm trying to do: I have a script where I import MonkeyRunner,…
Gabriel Porumb
  • 1,661
  • 1
  • 12
  • 21
0
votes
1 answer

Installing an apk on sdcard from PC using ADB for testing and take screenshot

I am using an ADB or android debugging bridge for the the first time. The problem is I have written a code to download the APK from the market on the device directly. Now I want to run the ADB to install the downloaded apk and take screenshots. How…
0
votes
1 answer

Is it possible to use pyGTK and Monkeyrunner in same script?

I started with importing GTK, and monkeyrunner: from com.android.monkeyrunner import MonkeyRunner import gtk ... when I run this with monkeyrunner in the SDK tools, it says ImportError: No module named gtk. When I run this with Python, it says…
NoBugs
  • 9,310
  • 13
  • 80
  • 146
0
votes
1 answer

How to use BroadcasetIntent() function in Monkeyrunner

Can anyone let me know how to use device.broadcastIntent function for the create contact using python script
0
votes
1 answer

Can monkeyrunner interact with android notifications?

I'm starting to look at android monkeyrunner, and would like to test my application with it. My application opens a Notification in the android pull-down menu, and I would like monkeyrunner to test if the notification behaves correctly. Is it…
Thomas M.
  • 1,496
  • 1
  • 10
  • 21
0
votes
1 answer

How to find out real co-ordinates of a view using Android viewClient in Monkeyrunner?

Finding (x,y) cordinates of a text in the android UI using dtmilano Android vieClient in Monkeyrunner. i am getting only relative cordinates using below code:- vc = ViewClient(devid,deviceid) dump=vc.dump() peer_pos =…
Rilwan
  • 2,251
  • 2
  • 19
  • 28
0
votes
2 answers

Running Android MonkeyRunner for mulitple activities

I am trying to do some automated testing against a complex Android app and I'm wondering if MonkeyRunner is the right tool. I keep seeing that you need to load the activity you want to test, but what if you want to test multiple activities? Say you…
BlackHatSamurai
  • 23,275
  • 22
  • 95
  • 156
0
votes
1 answer

Using monkeyrunner: How can I call intents during the execution of an application?

I have an android application for which I would like to test intent functionality alone. Is it possible with monkeyrunner to start an application create an intent (based on some already established list, and may have extras) startActivity() or…
Rowhawn
  • 1,409
  • 1
  • 16
  • 25
-1
votes
1 answer

Monkeyrunner automation using Jython

I need to automate a testing for an third party application. I've only the apk file which is installed in my emulator. Is it possible to do it through monkeyrunner? If yes can you help me out to start it with Jyton command line?
Raghu
  • 43
  • 4
-1
votes
1 answer

How do I properly set up java paths and other system variables to start monkeyrunner?

When I first attempted to run monekyrunner.bet I got some error about java not being found. At that moment java.exe was at C:\Program Files\Android\Android Studio\jre\bin\java.exe which came with the latest android studio installation (Android…
user13267
  • 6,871
  • 28
  • 80
  • 138
1 2 3
31
32