0

Per instructions:

sudo easy_install --upgrade androidviewclient

output of that command includes:

Installed /Library/Python/2.7/site-packages/androidviewclient-8.13.1-py2.7.egg

However when I try to use it in a monkeyrunner python script I get ImportError: No module named dtmilano

It seems I have an "egg" but is it really installed?

superstar3000
  • 389
  • 5
  • 16

1 Answers1

2

It seems to be installed, however you should use python as the interpreter, not monkeyrunner.

The first line in your script should be

#! /usr/bin/env python

and the script should be executable

$ chmod +x myscript.py

BTW, to have a template to start the creation of your script you can use

$ culebra -U -o mytest.py

and it will create a test script that you can then modify to suite your needs.

EDIT

According to you gist what you are trying to do, can be done using culebra and perhaps some edits to the generated file.

$ culebra --do-not-verify-initial-screen-dump --start-activity=com.android.settings/.Settings --output=settings.py

Notice that I'm using Settings because DevelopmentSettings is usually a Fragment not an Activity.

Diego Torres Milano
  • 65,697
  • 9
  • 111
  • 134
  • I get No module named dtmilano when II run this script taken from your examples. https://gist.github.com/anonymous/e8d8c12f5571af6f295c Any ideas? Would love to start using AndroidViewClient. – superstar3000 Nov 07 '14 at 20:48
  • You didn't follow my advice. Use `culebra` to obtain the template. – Diego Torres Milano Nov 07 '14 at 21:00
  • After you run `culebra` you'll notice that `from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice` SHOULD NOT BE there. – Diego Torres Milano Nov 07 '14 at 21:01
  • Thanks for your help. Getting this error when running culebra https://gist.github.com/slindsey3000/e833011a7c0a29b61d0c – superstar3000 Nov 07 '14 at 21:27
  • For some reason *AVC* cannot get display info for your device. Can you please provide more details (device, model, android version, api, etc.). When in doubt, test the same on emulator and see if it works. – Diego Torres Milano Nov 07 '14 at 21:50
  • HTC One, 4.1.2 version of Android. Very frustrating. Want to use ViewClient badly! :) – superstar3000 Nov 10 '14 at 19:02