Robotium版本更新日誌翻譯(不定期更新)

版權聲明:本文爲博主原創文章,未經博主允許不得轉載。 https://blog.csdn.net/gongke425281007/article/details/51007310
Android自動化測試工具Robotium當前已更新至5.5.4版本,以下整理了Robotium 5.0以後系列的更新日誌,翻譯可能存在錯誤,歡迎各位留言指出。
最新更新日期:2016.3.29
Google:https://code.google.com/p/robotium/
Github:https://github.com/RobotiumTech/robotium

Robotium 5.5.4

Roboitum當前版本將完全支持Android6.0! 我們同樣增加了新方法,比如scrollDownRecyclerView和pressSoftKeyboardDoneButton.

特性:

  • scrollDownRecyclerView(int index) - 向下滾動第index個RecyclerView
  • scrollRecyclerViewToBottom(int index) - 向下滾動第index個RecyclerView至底部
  • scrollUpRecyclerView(int index) -  向上滾動第index個RecyclerView
  • scrollRecyclerViewToTop(int index) - 向上滾動第index個RecyclerView至頂部
  • pressSoftKeyboardGoButton() -按下軟鍵盤go按鈕
  • pressSoftKeyboardDoneButton() - 按下軟鍵盤done按鈕

Bugs/Enhancements 修復:

  • getView(int id) & getView(int id, int index) - 找不到view時將包含resource name
  • Issue-779: 截屏功能在android M無法工作
  • Issue-552: Solo.getViews() 可能會返回空List
  • WebViews改進穩定性

Robotium 5.4.1

Roboitum當前版本有了一些新特色比如illustrate, clickInRecyclerView and commandLogging. 我們同樣更新了Activity handling 和多種不同的點擊方法.

特性:

  • illustrate(Illustration illustration) - 在屏幕上畫一個有任意數量的點的任意的路徑
  • clickInRecyclerView(int itemIndex) - 在第一個發現的RecyclerView上點擊指定的item索引
  • clickInRecyclerView(int itemIndex, int recyclerViewIndex) - 在指定索引的RecyclerView上點擊指定的item索引
  • clickLongInRecycleView(int itemIndex) - 在第一個發現的RecyclerView上長按指定的item索引
  • clickLongInRecycleView(int itemIndex, int recyclerViewIndex) - 在指定索引的RecyclerView上長按指定的item索引
  • clickLongInRecycleView(int itemIndex, int recyclerViewIndex, int time) -在指定索引的RecyclerView上指定的item索引長按指定時間

新設置 Solo.Config:

  • public String webFrame - 設置 web frame被Robotium所使用. 默認值爲 "document"
  • public boolean commandLogging - 設置爲true,如果使用command logging要爲enabled.默認值爲 false
  • public boolean commandLoggingTag - 設置 commandLogging tag. 默認值爲"Robotium"

Bugs/Enhancements 修復:

  • Issue-309 - command logging
  • Issue-647 - 需要方法來切換iframe內容
  • Issue-661 - xpath 結果只有一個節點
  • Issue-673 - 當調用finishOpenedActivities時停止ActivityMonitor 

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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章