云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > robotium 中文API

robotium 中文API

  • 62 次阅读
  • 3 次下载
  • 2025/5/5 3:52:44

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?

waitForCondition(Condition condition, final int timeout) //等待条件是否满足

支持WebView操作

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) //点击某个WebElement clickOnWebElement(By by)

clickOnWebElement(By by, int match)

clickOnWebElement(By by, int match, boolean scroll)

enterTextInWebElement(By by, String text) //某个WebElement中输入指定文本

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) //截取图片并且以一定比例压缩 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)

RobotiumUtils:

弃用的方法:

? ? ?

getAllOpenedActivities() finishInactiveActivities()

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

?

Robotium中文API(05)-solo. clickLongInList

作者 HAO.SHEN

? ?

clickLongInList

?

public ArrayList clickLongInList(int line)

?

长按一个给定的列表行并返回此行显示的TextView集合,默认操作第一个找到的ListView。

?

参数:

?

line – 被点击的行

?

Returns:

?

返回此行一个包含TextView对象的数组

?

public ArrayList clickLongInList(int line,

?

int index)

?

长按一个指定的ListView中给定的列表行并返回此行显示的TextView集合。

?

参数:

?

line – 被点击的行

?

index – 列表索引. 1 表示当前有两个列表

?

Returns:

?

返回位于指定列表中指定行的TextView对象数组

?

public ArrayList clickLongInList(int line,

?

int index,

?

int time)

?

长按一个指定的ListView中给定的列表行并返回此行显示的TextView集合。

?

参数:

?

line – 被点击的行

?

index – 列表索引. 1 表示当前有两个列表

?

time – 长按的时间

?

Returns:

?

返回位于指定列表中指定行的TextView对象数组

Robotium中文

API(06)-solo.clickLongOnScreen

作者 HAO.SHEN

clickLongOnScreen

public void clickLongOnScreen(float x, float y) 长按屏幕上给定的坐标 参数: x – x的坐标 y – y的坐标

public void clickLongOnScreen(float x, float y, int time) 长按屏幕上给定的坐标一段时间 参数: x – x的坐标 y – y的坐标 time – 长按时间

搜索更多关于: robotium 中文API 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? waitForCondition(Condition condition, final int timeout) //等待条件是否满足 支持WebView操作 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) /

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com