Robotium API 翻译(三)——判断测试结果的方法assert、is、search
来源:互联网 发布:单机破解版进销存软件 编辑:程序博客网 时间:2024/06/06 05:56
assert最常用的还是assertThat方法,是Junit的判断,这里就不多说了。
断言方法assert(robotium特有的断言方式,实际项目中和Junit的assert方法配合使用)
返回:无
返回:无
返回:无
is方法
boolean isCheckBoxChecked (int index | String text)
判断checkBox是否处于被选中的状态,可以通过index和text两种方法定位
参数:
index-检查的checkBox的索引值,如果只有一个可用则为0
text-检查的checkBox的文字,可使用正则表达式
返回:
true-如果被选中
false-如果没有被选中
boolean isRadioButtonChecked (int index | String text)
判断RadioButton是否处于被选中的状态,可以通过index和text两种方法定位
参数:
index-检查的RadioButton的索引值,如果只有一个可用则为0
text-检查的RadioButton的文字,可使用正则表达式
返回:
true-如果被选中
false-如果没有被选中
boolean isRadioButtonChecked (int index | String text)
判断RadioButton是否处于被选中的状态,可以通过index和text两种方法定位
参数:
index-检查的RadioButton的索引值,如果只有一个可用则为0
text-检查的RadioButton的文字,可使用正则表达式
返回:
true-如果被选中
false-如果没有被选中
boolean isToggleButtonChecked (int index | String text)
判断ToggleButton是否处于被选中的状态,可以通过index和text两种方法定位
参数:
index-检查的ToggleButton的索引值,如果只有一个可用则为0
text-检查的ToggleButton的文字,可使用正则表达式
返回:
true-如果被选中
false-如果没有被选中
boolean isSpinnerTextSelected ( [int index, ] String text)
判断SpinnerText是否处于被选中的状态,可以通过index定位
参数:
index-检查的SpinnerText的索引值,如果只有一个可用则为0
text-检查的SpinnerText的文字,可使用正则表达式
返回:
true-如果被选中
false-如果没有被选中
boolean isTextChecked (String text)
判断text是否处于被选中的状态,可以通过text定位
参数:
text-检查的text的文字,可使用正则表达式
返回:
true-如果被选中
false-如果没有被选中
search方法
boolean searchButton (String text [, int minimumNumberOfMatches, boolean onlyVisible])
判断当前的屏幕中是否能找到指定的button
参数:
text-查找的button的文字
minimumNumberOfMatches-最小指定多少才算是通过,0表示1个或者多个
onlyVisible-只记录可见的
返回:
true-如果找到了该控件
false-如果没有找到该控件
boolean searchText (String text [, int minimumNumberOfMatches, boolean scroll, boolean onlyVisible])
判断当前的屏幕中是否能找到指定的text,即文本
参数:
text-查找的Text的文字
minimumNumberOfMatches-最小指定多少才算是通过,0表示1个或者多个
scroll-是否允许滚动搜索,true表示支持,false表示只能在当前屏幕内查找
onlyVisible-只记录可见的
返回:
true-如果找到了该文本
false-如果没有找到该文本
boolean searchToggleButton (String text [, int minimumNumberOfMatches])
判断当前的屏幕中是否能找到指定的ToggleButton
参数:
text-查找的ToggleButton的文字
minimumNumberOfMatches-最小指定多少才算是通过,0表示1个或者多个
返回:
true-如果找到了该控件
false-如果没有找到该控件
boolean searchEditText (String text)
判断当前的屏幕中是否能找到指定的EditText
参数:
text-查找的Text的文字
返回:true-如果找到了该文本
false-如果没有找到该文本
- Robotium API 翻译(三)——判断测试结果的方法assert、is、search
- Robotium API 翻译(三)——判断测试结果的方法assert、is、search
- Robotium API 翻译(三)——判断测试结果的方法assert、is、search
- Robotium API 翻译(三)——判断测试结果的方法assert、is、search
- Robotium API 翻译(三)——判断测试结果的方法assert、is、search
- Robotium API 翻译(三)——判断测试结果的方法assert、is、search
- Robotium API 翻译(三)——判断测试结果的方法assert、is、search .
- Robotium API 翻译(三)——判断测试结果的方法assert、is、search
- Robotium 判断测试结果的方法assert、is、search
- Robotium API 翻译(五)——web控件测试方法,WebElement和By类
- Robotium API 翻译(五)——web控件测试方法,WebElement和By类
- Robotium API 翻译(五)——web控件测试方法,WebElement和By类
- Robotium API 翻译(五)——web控件测试方法,WebElement和By类
- Robotium API 翻译(五)——web控件测试方法,WebElement和By类
- Robotium API 翻译(五)——web控件测试方法,WebElement和By类
- Robotium API 翻译(五)——web控件测试方法,WebElement和By类
- Robotium API 翻译(五)——web控件测试方法,WebElement和By类
- Robotium API 翻译(五)——web控件测试方法,WebElement和By类
- Spring MVC 教程,快速入门,深入分析
- 女友嫁人新郎不是我
- POJ2753
- Java图像处理最快技术:ImageJ 学习第一篇
- [总结]FFMPEG视音频编解码零基础学习方法 ---总结的不错
- Robotium API 翻译(三)——判断测试结果的方法assert、is、search
- 类似播放器的jQuery图片切换
- 小记
- Android Button Maker(在线生成android shape xml文件的工具),真方便!
- 线程中更新窗口不能直接调用UpdateData函数 的解决办法
- Robotium API 翻译(四)——等待执行的方法sleep、waitFor
- JDBC连接自定义sqlserver数据库实例名(多个实例)
- TextArea Field in SharePoint webpart property 在sharepoint webpart属性面版里使用TextArea
- 嵌入ArcGIS Web 地图指南