Android自動化測試工具-Robotium 4.0發布啦!

發表于:2013-03-27來源:網易杭州 QA Team作者:黃慶兵點擊數: 標簽:Robotium
Android自動化測試工具-Robotium 我們很高興的看到官方(http://code.google.com/p/robotium/)終于發布Robotium 4.0版本,這是有史以來最大的一次單獨版本更新,并提供了Web支持,現在,Robotium可以和你的hybird apps交互了。searchText(), waitForText(), clickOnText

  我們很高興的看到官方(http://code.google.com/p/robotium/)終于發布Robotium 4.0版本,這是有史以來最大的一次單獨版本更新,并提供了Web支持,現在,Robotium可以和你的hybird apps交互了。searchText(), waitForText(), clickOnText(),scroll() , takeScreenShot()等方法,現在也很好的支持WebViews。

  Robotium 4.0版本中,略去了許多內部細節,改為更為穩定快速的測試執行方式。比如,更新了類RobotiumUtils,新增了用于過濾、排序和操作Views的方法。也引入了WebElement類,用于操作WebViews里識別到的元素。

  Robotium 4.0新增方法:

  - waitForCondition(Condition condition, final int timeout)- waitForWebElement(By by) //Example: waitForWebElement(By.id("id"));- waitForWebElement(By by, int timeout, boolean scroll)- waitForWebElement(By by, int match, int timeout, boolean scroll)- clickOnWebElement(WebElement webElement)- clickOnWebElement(By by)- clickOnWebElement(By by, int match)- clickOnWebElement(By by, int match, boolean scroll)- enterTextInWebElement(By by, String text)- typeTextInWebElement(By by, String text)- typeTextInWebElement(By by, String text, int match)- typeTextInWebElement(WebElement webElement, String text)- clearTextInWebElement(By by)- getWebElement(By by, int index)- getCurrentViews(Class classToFilterBy)- getCurrentViews(Class classToFilterBy, View parent)- takeScreenshot(String name, int quality)

  類RobotiumUtils更新的方法:

  - removeInvisibleViews(Iterable viewList)- filterViews(Class classToFilterBy, Iterable viewList)- filterViewsToSet(Class classSet[], Iterable viewList)- sortViewsByLocationOnScreen(List views)- sortViewsByLocationOnScreen(List views, boolean yAxisFirst)- getNumberOfMatches(String regex, View view, Set uniqueTextViews)

  刪除的方法:

  - getAllOpenedActivities()- finishInactiveActivities()- getCurrentXViews //replaced by getCurrentViews(Class classToFilterBy). Example: getCurrentViews(ListView.class)

  這里先初探一下Robotium 4.0的變化和特性,有待后續更深入的研究??偟膩碚f,Robotium 4.0比以前更完善,并支持Web控件!如果有需要者,趕緊嘗鮮一試吧(猛擊下載)!

原文轉自:http://qa.blog.163.com/blog/static/1901470022013212517881/

国产97人人超碰caoprom_尤物国产在线一区手机播放_精品国产一区二区三_色天使久久综合给合久久97