Appium ios 版获取 UIATextField 元素的 placeholoder 属性

萤火虫 · 2017年01月20日 · 554 次阅读

如题, 获取 ios 版的 UIATextField 元素的 placeholoder 属性, appium 获取到的属性没有和 placeholoder 完全对应的, 只有 value 属性与之对应, 但不能区分 placeholoder 和 text.目前想到一种方法,

String oldText = ele.getText();
ele.clear();
String newText = ele.getText();
if (oldText.equals(newText)) {
  String placeholoder = oldText();
}

这种方法, 比较挫, 也比较慢, 想问问论坛里有没有大神知道,好点的方法, 不胜感激!!!

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