UiObject2 API的简单译文

UiObject2 API的简单译文

extends Object

Package android.support.test.uiautomator
Class Overview


A UiObject2 represents a UI element. Unlike UiObject, it is bound to a particular view instance and can become stale if the underlying view object is destroyed. As a result, it may be necessary to call findObject(BySelector) to obtain a new UiObject2 instance if the UI changes significantly.
UiObject2代表一个UI元素。和UiObject不同,它是绑定到一个特定的视图实例,如果它的底层视图对象被摧毁,它可能会过时。因此,如果UI变化显著它可能需要调用findObject(BySelector)获得一个新的UiObject2实例。


void clear()
Clears the text content if this object is an editable field.
如果此对象是一个编辑区域,就清空编辑区域的内容。
void click()
Clicks on this object.
点击此对象。
<R> R clickAndWait(EventCondition<R> condition, long timeout)
Clicks on this object, and waits for the given condition to become true.
点击此对象,并等待给出的条件成立。
void drag(Point dest, int speed)
Drags this object to the specified location.
拖动此对象到指定位置。
void drag(Point dest)
Drags this object to the specified location.
拖动此对象到指定位置。
boolean equals(Object object)
判断对象是否一致
UiObject2 findObject(BySelector selector)
Searches all elements under this object and ret
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值