错误:没有名为dtmilano的模块

时间:2013-08-01 14:50:28

标签: android python monkeyrunner androidviewclient

我按照以下帖子中提到的步骤操作: Can't get AndroidViewClient example code to run

但我仍然得到错误“没有名为dtmilano的模块”

在我的test.py文件中,我添加了以下行:

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

在dump.py文件中完成相同的操作

我还为AndroidViewClient设置了环境变量。 我错过了什么吗? 提前谢谢。

1 个答案:

答案 0 :(得分:0)

我猜这与'\'(反斜杠)的处理方式有关,它们可能转义以下字符。

使用 AndroidViewClient 插件解释此问题here应解决此问题。

例如:

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