新手区 关于 uiautomatorviewer 和控件定位的一点疑问, 希望大家指教

暴走喵 · 2016年04月14日 · 779 次阅读

我在 uiautomatorviewer 中看到手机页面中没有一个控件的 scrollable 属性为 true, 但是脚本中却可以找到. 刚刚学习 UiAutomator,不知道是不是什么地方理解错误了.

下面贴出我定位控件的脚本:
UiScrollable appview = new UiScrollable( new UiSelector().scrollable(true));
appview.setAsHorizontalList();
UiObject openapp = appview.getChildByText(new UiSelector() .className(android.widget.TextView.class.getName()), "当当");

下图是我用 uiautomatorviewer 获取的控件信息:

暂无回复。
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册