Google:https://code.google.com/p/robotium/
Github:https://github.com/RobotiumTech/robotium
Robotium 5.3.1
我们一直专注于对Robotium各个方面的完善。比如,已经完成了对点击操作逻辑以及速率上的改善。该版本在修复Bug的同时,也加入了一些新特性,比如setWiFiData。
新特性:
· setWiFiData - 设置WIFI的开关
· setMoibleData - 设置手机数据的开关
· getView(Object tag) - 通过特定的标记获取View对象
· getView(Object tag, int index) - 通过特定的标记以及索引获取View对象
· waitForView(Object tag) - 等待特定标记的View对象出现
· waitForView(Object tag, int minimumNumberOfMatches, int timeout, boolean scroll) - 等待特定标记的View对象出现。可设置最小的匹配数以及是否滑屏操作
· 修复scroll方法不支持RecyclerViews的问题
· Solo.Config可配置trackActivities参数为false,用以关闭Activity的处理
Robotium 5.2.1
我们一直专注于优化滑动方法,包括对这些方法的提速以及逻辑上的完善。该版本在修复Bug的同时,也加入了一些新特性,比如unlockScreen。
新特性:
· unlockScreen() - 屏幕解锁
· getCurrentViews(Class classToFilterBy, boolean includeSubclasses) - 新增参数includeSubclasses,如果设置为true,则会返回子类
· scrollToSide(Side side, float scrollPosition, int stepCount) - stepCount参数控制滑动的速度
· scrollViewToSide(View view, Side side, float scrollPosition, int stepCount) - stepCount参数控制滑动的速度
Robotium 5.1
对Robotium的优化仍在进行中,不过5.1版本是到目前为止最快最准确且最稳定的版本了
注意:现在的包名是: com.robotium.solo
新特性:
· Solo(Instrumentation instrumentation, Config config, Activity activity) - 新构造器
· pressSoftKeyboardSearchButton() - 点击软键盘上的搜索按钮
· getWebElements() - 返回激活状态的WebView下的所有WebElements元素
· getWebElements(By by) - 返回激活状态的WebView下匹配By对象的所有WebElements元素
· setNavigationDrawer(int status) - 设置NavigationDrawer的状态.
· getConfig() - 获取Robotium的配置
Robotium 5.0.1
当前版本引入了SoloConfig类,Robotium的开发者们可以在该类中修改配置,比如默认的超时时间,截图路径以及各式,滑动还有web element的点击行为。同样地,本次更新对一些内部类做了优化。
注意:现在的包名是: com.robotium.solo
新特性:
· pressSoftKeyboardNextButton()
· waitForEmptyActivityStack()
Solo.Config:
· int timeout_large - waitFor方法的超时时长.
· int timeout_small - get, is, set, assert, enter and click方法的超时时长.
· String screenshotSavePath - 截图保存路径
· ScreenshotFileType screenshotFileType - 截图文件格式,比如JPEG或者PNG.
· boolean shouldScroll - 设置为true,如果get, is, set, enter, type and click方法需要滚屏
· boolean useJavaScriptToClickWebElements - 设置为true,如果使用JavaScript 来点击WebElements.
优化:
· 优化所有的点击方法在不适合的场景下的行为
· waitForDialogToOpen以及waitForDialogToClose
· 内部View的处理
· 当前的TakeScreenshot方法支持GLSurfaceViews