android - 在 Android 项目 :- In my application there are lots of images, 中,我必须验证它们,我如何使用断言

标签 android automation robotium

在 Robotium 中:- 我正在使用 Solo 类编写自动化脚本。现在我必须验证我的应用程序中的图像。

对于文本,我们可以使用Assert.assertTrue(solo.searchText("rtf"));

对于images,Robotium Solo Class中有没有命令?

最佳答案

不是真的。最推荐的测试方法(其含义可能不同)ImageViews 由以下方式给出:

  • 在被测代码中,在 ImageView 标记中设置您稍后要检查的内容。例如。可绘制资源 ID。
  • 在测试代码中,获取您在标记中设置的任何内容,并验证它是否具有预期值。

此外,您可能想看看 this discussion一些其他的方法来目视检查图像。

关于android - 在 Android 项目 :- In my application there are lots of images, 中,我必须验证它们,我如何使用断言,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8255015/

相关文章:

android - 如何从手机设置中卸载应用程序时显示警报消息

android - youtube上传出现问题

msbuild - 使用 MSBuild 调用设置 AssemblyFileVersion?

python - 无法在 azure 自动化运行笔记本中导入包?

使用 Robotium 进行 Android 测试注释

android - 在 GridView 中加载多个大图像的最佳方法

javascript - 解决未捕获的语法错误 : Unexpected token >

javascript - 如何在 iMacros 下仅用条件替换字符串的特定部分

android - Robotium waitForFragment

android - 如何使用 Robotium 单击微调器中的第一项?