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

Android: Emulator: Python: Tabbing between Fields in a Form

I'm automating the entry of SQLite data in an Android app I'm writing. The app is written in Java. The functional ui test is written in python using MonkeyRunner and is being run against the Android 4.2 emulator running on my Win7 laptop. #Touch the…
Quasaur
  • 1,335
  • 1
  • 10
  • 27
0
votes
1 answer

ChimpChat Instrumentation

I am trying to use chimpchat from a java program. I am able to successfully establish connection with two emulator instances running. But when i call instrument() function on the device, to run a test suite,the program crashes with a null-pointer…
0
votes
1 answer

Android MonkeyRunner script not running on Ubuntu 10.04

I'm getting no output. I set up monkeyrunner for Eclipse, following: http://dtmilano.blogspot.com/2011/03/using-android-monkeyrunner-from-eclipse.html directions. I managed to get my code to 'run' cleanly within Eclipse- no errors. From the command…
0
votes
2 answers

how to set permission for accessing WIFI APIs in python script(MonkeyRunner script)

I am writing MonkeyRunner script which checks state of wifi and enables it. For doing so I am importing android API and its classes. Below is code snippet from android.net.wifi import WifiManager global state state =…
surendra
  • 1
  • 2
0
votes
0 answers

Is it possible to import conent of Manifext.XML file to MonkeyRunner script file

I am writing MonkeyRunner script which checks state of wifi and enables it. For doing so I am importing android API and its classes. Below is code snippet; from android.net.wifi import WifiManager global state state =…
surendra
  • 1
  • 2
0
votes
1 answer

How to scale touch event coordinates for Android MonkeyRunner to support multiple devices with the same script?

I'm trying to write a monkeyrunner script that will automate the installation of mdm software for enterprise users. The script will be executed with multiple devices and thus multiple screen sizes and densities. Is there a way to take a reference…
0
votes
1 answer

In Android monkeyrunner, is there anything similar to waitForPageToLoad()

In Android monkeyrunner, is there anything similar to waitForPageToLoad() (like in Selenium), as I don't want to use Thread.sleep() because of its limitations?
Elly Gayle
  • 67
  • 1
  • 6
0
votes
1 answer

Viewclient touch() is working as a long tap , it should work as click?

I am testing a Gallery application of android 4.0.3 using monkeyrunner with androidviewclient and when I am trying click on any album with touch() function of AVC it is selecting the album . It should open a album. My code for opening a album is …
NRP
  • 13
  • 3
0
votes
1 answer

Monkeyrunner error for some real devices

the code is very simple from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice, MonkeyImage device = MonkeyRunner.waitForConnection() device.touch(84, 712, "DOWN_AND_UP") It's OK to run on simulator and my SE Xperia Ray, but when I run on…
Jamy
  • 1
  • 1
  • 2
0
votes
1 answer

Monkeyrunner parallel execution on devices

Im trying to use monkeyrunner to configure multiple tablets attached to the same pc. The code works ok for 1 tablet but the moment I try to run it on multiple tablets it all blows up. Here is the code which invokes the monkeyrunner python file.…
smk
  • 5,340
  • 5
  • 27
  • 41
0
votes
1 answer

How to use javascript in eclipse-android to build an android testing program?

How to use javascript in eclipse-android to build an android testing program? I have no idea to test, just have learned android application developments. someone use Python to do,I just want to have a try to use javascript, may be something about…
0
votes
1 answer

MonkeyRunner and Dialog

I am learning MonkeyRunner tool. I have a Date and Time Picker and want to pass the values to it. I tried using device.Type(). But that does not work. Any help regarding this is appreciated.
AndroGeek
  • 1,280
  • 3
  • 13
  • 25
0
votes
1 answer

How to enter text in text field using monkeyrunner

i wanted to enter some text to a text field in my android application.I installed the app and in the second page i wanted to search for some places.For that i need to enter some text. I tried…
user1722227
  • 21
  • 1
  • 7
0
votes
1 answer

is there an equivalent to jython -i (interactive prompt) for monkeyrunner?

I'm a huge fan of python/jython's -i switch, as in $ jython -i set_up_my_stuff.py .. ..sets up object1 ..sets up object2 >>> object1.do_stuff() I'm wondering if there is an equivalent for monkeyrunner? Doesn't seem to be a ./monkeyrunner -i…
ether_joe
  • 1,068
  • 1
  • 13
  • 32
0
votes
1 answer

Android: get UI element tree from code (ChimpChat or monkeyrunner) over Hierarchy viewer

I want to get all active UI elements from an (active) Activity without accessing the code. Exactly like the Hierarchy Viewer Tool, just from code. At the moment I use the .jar files behind the monkeyrunner tool in java, but using the python API…
Dr. AtZe
  • 435
  • 1
  • 4
  • 14