摘要: click&clickLong方法(点击/长按事件) ArrayList clickList(int line[,int index]) 点击当前textlist中的第line行,可以指定listview的索引,不指定时默认为第一个 参数: line-点击第几行 index-点击第几个list... 阅读全文
posted @ 2014-09-28 16:43 deepstone 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 在自动化测试中,UI上经常有一些控件是没有名称的,那么此时,就可以通过id来找到这些控件。案例:对两个EditText进行测试[java]view plaincopypackagecom.tangbc.tedit.test;importorg.junit.After;importorg.junit.... 阅读全文
posted @ 2014-09-28 16:34 deepstone 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 上下滚动scrollDown[html]view plaincopypublicbooleanscrollDown()Scrollsdownthescreen.Returns:trueifmorescrollingcanbeperformedfalseifitisattheendofthescree... 阅读全文
posted @ 2014-09-28 16:02 deepstone 阅读(336) 评论(0) 推荐(0) 编辑
摘要: 在Robotium中,截图的方法时调用takeScreenshot()。但有使用你会发现明明代码里调用了solo.takeScreenshot(),但却没有截图成功,那是因为被测试的应用没有SD卡的权限(因为该方法会把截图保存在SD卡中)。因此要使用该方法,必须在被测工程的AndroidManife... 阅读全文
posted @ 2014-09-28 15:35 deepstone 阅读(1000) 评论(0) 推荐(0) 编辑
摘要: Robotium是一款基于控件的Android自动化测试框架环境搭建(window):安装JDK以及集成Android Sdk的eclipise。入门:1,下载Robotium Solo 5.1,点我下载2,开启eclipse,并导入工程(代码在最下面)3,创建测试工程new --- project... 阅读全文
posted @ 2014-09-28 15:31 deepstone 阅读(3225) 评论(0) 推荐(0) 编辑