Error: No module named dtmilano

786 Views Asked by At

I followed the steps mentioned in the below post: Can't get AndroidViewClient example code to run

But im still getting error "No module named dtmilano"

In my test.py file i have added the following lines :

sys.path.append('C:\AndroidViewClient-master\AndroidViewClient-master\AndroidViewClient\src')
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
from com.dtmilano.android.viewclient import ViewClient

the same is done in dump.py file

I have also set the environment variable for AndroidViewClient. Is there anything i missed ? Thanks in advance.

1

There are 1 best solutions below

0
On

I guess is related with how the '\' (backslash) are treated, they may be escaping the following character.

Using AndroidViewClient plugin as explained here should solve this Windows problem.

For example:

c:>\path\to\monkeyrunner -plugin \path\to\androidviewclient-<version>.jar myscript.py