用eclipse调试monkeyrunner的脚本
来源:互联网 发布:淘宝阳光房隔热材料 编辑:程序博客网 时间:2024/06/07 05:21
关于用eclipse调试monkeyrunner这个问题,大侠Diego Torret已经出了一篇新的博文,需要翻墙看
http://www.google.com.hk/url?sa=t&rct=j&q=Eclipse%3A+working+monkeyrunner+configuration&source=web&cd=1&ved=0CGEQFjAA&url=http%3A%2F%2Fdtmilano.blogspot.com%2F2012%2F03%2Feclipse-working-monkeyrunner.html&ei=n4XET97YOeitiAfZ57CWCg&usg=AFQjCNGM1RSCtqmGnMT07QQknztXvNH9nQ
Diego Torret的主页
http://dtmilano.blogspot.com/
经过诸多坚持不屑的努力后,我认为我无法在windows 的版本上用eclipse调试monkeyrunner的脚本,但是我在ubuntu上是成功设置过了的。具体方法还请参阅Diego torret的原文,我这里只做一些补充,首先是默认的python解释器的设置要改成monkeyrunner,如下图所示。这样建立起来的monkeyrunner脚本就可一用eclipse来跑了。
转发http://www.google.com.hk/url?sa=t&source=web&cd=1&ved=0CBkQFjAA&url=http%3A%2F%2Fdtmilano.blogspot.com%2F2011%2F03%2Fusing-android-monkeyrunner-from-eclipse.html&rct=j&q=monkeyrunner%20eclipse&ei=ZfduTuH9AuWViAfFocnJCQ&usg=AFQjCNG6-Z1c7MD-QfmSZN9YmTN6QLM3_A&cad=rjt
Using Android monkeyrunner from Eclipse
You may want to edit scripts and run them fromEclipse.
To be able to do this you must first install PyDev from Eclipse Marketplace.
Latest versions of PyDev don't work with monkeyrunner because it is not detected as a valid interpreter. I'm sure this will be finxed in the future. In the meantime you should stick toPyDev 1.6.5.
Then you have to define a new python interpreter
but before you can do it you need to do some changes to the Android installation. We need to replace themonkeyrunner interpreter because Eclipse invokes it using the-u command line option, unbuffer stdin, stdout and stderr, which is not supported bymonkeyrunner. To solve it we should rename the original interpreter to monkeyrunner-original and then use this script as a replacement for monkeyrunner.
# /bin/bash
if [ "$1" = '-u' ]
then
shift
fi
exec /home/zhouzhibin/android-sdk-2.3.4/tools/monkeyrunner-original "$@"
if you are using Microsoft Windows, you should use something like this (script contributed bytagmaster)
Don't forget to set the previously defined interpreter to the project properties.
Update: July 2011
This patch was added to monkeyrunner to ignore the-u option sent by PyDev:
http://android.git.kernel.org/?p=platform/sdk.git;a=commitdiff;h=f07d8c2026606633f1de7e1ab9d985c74ad8b340
However, the usage string does not include the -u option yet. BTW, credit would be nice.
So, the wrapper is not needed any more.
To be able to do this you must first install PyDev from Eclipse Marketplace.
Then you have to define a new python interpreter
but before you can do it you need to do some changes to the Android installation. We need to replace themonkeyrunner interpreter because Eclipse invokes it using the-u command line option, unbuffer stdin, stdout and stderr, which is not supported bymonkeyrunner. To solve it we should rename the original interpreter to monkeyrunner-original and then use this script as a replacement for monkeyrunner.
# /bin/bash
if [ "$1" = '-u' ]
then
shift
fi
exec /home/zhouzhibin/android-sdk-2.3.4/tools/monkeyrunner-original "$@"
if you are using Microsoft Windows, you should use something like this (script contributed bytagmaster)
REM@echo off
if("%1")==("-u") shift
"C:\Program Files\Android\android-sdk\tools"/monkeyrunner-original %1 %2 %3 %4 %5 %6 %7 %8
Once the new interpreter is defined and assigned to aPyDev project you will be able to edit and runmonkeyrunner scripts from Eclipse
Don't forget to set the previously defined interpreter to the project properties.
Update: July 2011
This patch was added to monkeyrunner to ignore the-u option sent by PyDev:
http://android.git.kernel.org/?p=platform/sdk.git;a=commitdiff;h=f07d8c2026606633f1de7e1ab9d985c74ad8b340
However, the usage string does not include the -u option yet. BTW, credit would be nice.
So, the wrapper is not needed any more.
- 用eclipse调试monkeyrunner的脚本
- MonkeyRunner_用eclipse调试monkeyrunner的脚本
- 用eclipse调试monkeyrunner的脚本
- 【MonkeyRunner】eclipse中编写monkeyrunner脚本环境搭建
- Monkeyrunner+eclipse
- monkeyRunner的录制和播放脚本
- 根据控件id实现的monkeyrunner脚本
- 锤子便签的 monkeyrunner 测试脚本
- 锤子便签的 monkeyrunner 测试脚本
- MonkeyRunner脚本的录制与回放分享
- monkeyrunner 录制脚本
- MonkeyRunner脚本编写
- Monkeyrunner 录制脚本&回放
- monkeyrunner写阴阳师脚本
- monkeyrunner脚本编写
- Monkeyrunner 脚本使用
- monkeyrunner脚本实践
- Monkeyrunner 写脚本的技巧(shell 命令,文件操作)
- jquery中的addClass(),removeClass(),toggleClass()
- awk中使用shell的环境变量
- JavaScript && OOP
- 关于stdint.h头文件
- What JSF is
- 用eclipse调试monkeyrunner的脚本
- Java泛型详解
- JavaSE骑士飞行棋
- Android-2.2display系统介绍-SW架构
- Oracle数据导入导出imp/exp命令 10g以上expdp/impdp命令
- SUM服务器监控软件--通用服务器监控方案
- python脚本中的#!/usr/bin/python
- App离线下载
- c#计算时间间隔差