robotium3.6与4.0以后的区别

本文介绍了Robotium自动化测试库在3.6版本和4.0及以后版本的区别,主要关注于`getCurrentViews()`方法的变化。在4.0版本中,虽然方法数量减少,但通过传入特定类参数,如`ImageView.class`,依然能实现类似3.6版本的功能,如获取当前屏幕上的ImageView列表。
摘要由CSDN通过智能技术生成

        因为下载的直接是最新版本的robotium4.1版,这次碰到gridView问题时,发现网上有getCurrentListViews() 、getCurrentImageViews()等方法。而自己却没有,纳闷了,下载查看了下3.6版本,果然有。

3.6版本中的方法:

 ArrayList<android.widget.Button> getCurrentButtons() 
          Returns an ArrayList of the Button objects currently shown in the focused Activity or Dialog.
 ArrayList<android.widget.CheckBox> getCurrentCheckBoxes() 
          Returns an ArrayList of the CheckBox objects currently shown in the focused Activity or Dialog.
 ArrayList<android.widget.DatePicker> getCurrentDatePickers() 
          Returns an ArrayList of the DatePicker objects currently shown in the focused Activity or Dialog.
 ArrayList<android.widget.EditText> getCurrentEditTexts() 
          Returns an ArrayList of the EditText objects currently shown in the focused Activity or Dialog.
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值