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

萤火虫 · January 20, 2017 · 567 hits

如题, 获取 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();
}

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

No Reply at the moment.
需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up