monkeyrunner

Integrating Monkeyrunner with UI Automator

坚强是说给别人听的谎言 提交于 2019-12-13 19:12:57
问题 Is it possible to integrate monkey runner with UI Automator. I have imported the Monkeyrunner jar in UI Automator project.But when I run ant build Build Fails as it does not recognise any of the Classes. Is their any other method to recognise Monkeyrunner classes in UI Automator Java Project Thanks in Advance 回答1: AndroidViewClient supports UiAutomator if present in the device. The details can be seen on this post: http://dtmilano.blogspot.ca/2012/11/androidviewclient-uiautomator-support.html

How to enter values to a text field using monkeyrunner

余生长醉 提交于 2019-12-13 06:05:38
问题 I am trying to enter some text to a text field in my android application using Monkeyrunner. I wrote the code like this: device.press('KEYCODE_BUTTON_SELECT',MonkeyDevice.DOWN_AND_UP) device.press('KEYCODE_U','DOWN_AND_UP') device.press('KEYCODE_S','DOWN_AND_UP') device.press('KEYCODE_E','DOWN_AND_UP') device.press('KEYCODE_R','DOWN_AND_UP') while running the first line,the text field is getting selected.But The string "user" is not typing there.But the same code i can run out of my

How to enter text in text field using monkeyrunner

不羁岁月 提交于 2019-12-13 04:07:24
问题 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 `device.press('KEYCODE_BUTTON_SELECT',MonkeyDevice.DOWN_AND_UP) device.press('KEYCODE_i','DOWN_AND_UP') device.press('KEYCODE_n','DOWN_AND_UP') device.press('KEYCODE_d','DOWN_AND_UP') device.press('KEYCODE_i','DOWN_AND_UP') device.press('KEYCODE_a','DOWN_AND_UP') or Device.type(India)` But these commands

Monkeyrunner throwing “ShellCommandUnrespo​nsiveException” - any work around?

旧时模样 提交于 2019-12-13 02:31:14
问题 I am facing some issues in device.shell('ping -c 2 192.168.1.1') inside a monkeyrunner script. Its throwing ShellCommandUnrespo‌​nsiveException [main] [com.android.chimpchat.adb.AdbChimpDevice]com.android.ddmlib.ShellCommandUnrespo‌​nsiveException while (count<1000) : device.shell('dmesg -c') print '****swithing OFF wifi in loop NO-',count device.touch(400,155,MonkeyDevice.DOWN_AND_UP) time.sleep(10) print '****switching ON wifi in loop NO-',count device.touch(400,155,MonkeyDevice.DOWN_AND_UP

Device press/touch with monkeyrunner on DroidBox don't work

我的未来我决定 提交于 2019-12-13 00:36:35
问题 I'm using a monkeyrunner script that works over DroidBox23, it is the script that cames by default in the DroidBox program, in the folder scripts/, but i modificated by this way: import re import sys import os import time from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice device = MonkeyRunner.waitForConnection() device.installPackage(sys.argv[1]) package = sys.argv[2] activity = sys.argv[3] # sets the name of the component to start runComponent = package + '/' + activity print

AndroidViewClient: content is not allowed in trailing section

南笙酒味 提交于 2019-12-12 04:57:14
问题 I installed AndroidViewClient via Git on my Windows Vista machine at home and I setup the path variables and ran the check-imports.py script to make sure everything was ok. Next, I tried to run the settings.py script from the /examples folder and got the following error: C:\Users\Allen>monkeyrunner C:\Users\Allen\AndroidViewClient\AndroidViewClient\e xamples\settings.py 130615 22:24:56.666:S [MainThread] [com.android.monkeyrunner.MonkeyRunnerOptions ] Script terminated due to an exception

Pressing buttons by 'text' on Android app using Culebra

…衆ロ難τιáo~ 提交于 2019-12-12 02:14:37
问题 I have a Android App that I am trying to test using culebra . The code is shown below. '''reated on 2017-02-08 by Culebra v12.5.3 __ __ __ __ / \ / \ / \ / \ ____________________/ __\/ __\/ __\/ __\_____________________________ ___________________/ /__/ /__/ /__/ /________________________________ | / \ / \ / \ / \ \___ |/ \_/ \_/ \_/ \ o \ \_____/--< @author: Diego Torres Milano @author: Jennifer E. Swofford (ascii art snake) ''' import re import sys import os from com.dtmilano.android

How to use MonkeyRunner and Robotium together (not separately!)

不羁的心 提交于 2019-12-12 01:29:16
问题 How to use MonkeyRunner and Robotium together (not separately!) for testing my Android app 回答1: Well, I found this http://download.yandex.ru/company/experience/yac2012/kharitonenko_yac_2012.pdf slide #22. There is a scheme, how to use a combination of Robotium and Monkeyrunner. For example, when in your tests, you need to take a snapshot from Android native Camera, and Robotium can't do that. Monkeyrunner can do it. But most of your test case developed in Robotium, so as I understood, you can

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

老子叫甜甜 提交于 2019-12-12 00:28:23
问题 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, MonkeyDevice, ViewClient from com.dtmilano.android.viewclient import ViewClient from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice Connect the tablet and create a MonkeyDevice object device = MonkeyDevice.waitForConnection() Using the

NoClassDefFoundError when running Monkey runner script

假如想象 提交于 2019-12-11 17:59:22
问题 I am running first time monkey runner script in my application but i got this following error: D:\android softwares\AndroidSDK\tools>monkeyrunner.bat test1.py Exception in thread "main" java.lang.NoClassDefFoundError: com/android/chimpchat /ChimpChat at com.android.monkeyrunner.MonkeyRunnerStarter.<init>(MonkeyRunnerStart er.java:60) at com.android.monkeyrunner.MonkeyRunnerStarter.main(MonkeyRunnerStarter .java:188) Caused by: java.lang.ClassNotFoundException: com.android.chimpchat.ChimpChat