简体   繁体   English

用robotium测试动态android ui

[英]testing dynamic android ui with robotium

I will have a ui which has buttons dynamically added to it. 我将拥有一个将按钮动态添加到其中的ui。 In order to test this I want to use robotum. 为了对此进行测试,我想使用robotum。 I have two options on how to build the ui, using activities or using fragments. 关于如何构建ui,我有两个选择,即使用活动还是使用片段。 The latter seems to be a better option for my situation but I read that robotium does not support fragments. 对于我的情况,后者似乎是一个更好的选择,但是我读到Robotium不支持片段。 Is there any other option I could consider or am I incorrect in saying robotium does not support fragments 还有其他我可以考虑的选择吗,或者我说机器室不支持片段不正确吗?

Robotium does support fragments. Robotium确实支持片段。 In 3.4.1 there are even fragment specific methods like waitForFragmentById() etc. 在3.4.1中,甚至有特定于片段的方法,例如waitForFragmentById()等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM