Android自動化測試框架—Robotium 4.3介紹
新版的的功能是:
- waitForDialogToOpen() // 等待對話框打開,默認等待時間是largeTimeout - waitForDialogToClose()// 等待對話框關(guān)閉,默認等待時間是largeTimeout - getString(String id) // 可以傳入文本id - scrollToSide(int side, float scrollPosition) // 水平滑動,多了一個要滑動的百分比scrollPosition(0-1)1是滑動整屏 - scrollViewToSide(View view, int side, float scrollPosition) // 水平滑動view,多了一個要滑動的百分比scrollPosition(0-1)1是滑動整屏 - WebElement.setAttributes(Hashtable<String,String> attributes) // WebElement新增attributes屬性 - WebElement.getAttribute(String attributeName) |
與老版本相比的改進點:
- getView(String id) //也可以傳入android.R中的id值,而不僅僅是工程下的R文件 - hideSoftKeyboard() // 確保能關(guān)閉軟鍵盤了 - clickOnMenuItem() // 提高等待時間 - enterText(), clearEditText() // 比以前要快了 - drag() // 首先會做關(guān)閉軟鍵盤操作 - takeScreenshot() // 更好的GL SurfaceViews支持 - searchText/waitForText //支持換行 - By.id //返回動態(tài)id - getCurrentWebElements() // 更好的支持css和xpath |
posted on 2013-12-17 09:11 順其自然EVO 閱讀(352) 評論(0) 編輯 收藏 所屬分類: android