info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: setText
info: [debug] [BOOTSTRAP] [debug] Using element passed in.
info: [debug] [BOOTSTRAP] [debug] Attempting to clear using UiObject.clearText().
info: [debug] [BOOTSTRAP] [debug] Text remains after clearing, but it appears to be hint text.
info: [debug] [BOOTSTRAP] [debug] Text not cleared. Assuming remainder is hint text.
info: [debug] [BOOTSTRAP] [debug] Sending plain text to element: 15.........(纯数字)
info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
以上是普通编辑框clear()后再send_keys(‘15*********’)appium端输出的信息,这个可以成功清除文本且正确输入指定的文本
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: setText
info: [debug] [BOOTSTRAP] [debug] Using element passed in.
info: [debug] [BOOTSTRAP] [debug] Attempting to clear using UiObject.clearText().
info: [debug] [BOOTSTRAP] [debug] Sending plain text to element: ‘text_replace’
info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
以上是密码编辑框clear()后再send_keys(‘text_replace’)appium端输出的信息,相比于普通编辑框输出的信息缺少了:
info: [debug] [BOOTSTRAP] [debug] Text remains after clearing, but it appears to be hint text.
info: [debug] [BOOTSTRAP] [debug] Text not cleared. Assuming remainder is hint text.
感觉出错应该是hint text的原因,但没能明白这个导致失败的原因也不知解决方法,还望指教
在此先感谢你能抽空回复我的疑问
补充一下调试设备信息 机型为红米1 Android版本为4.4.2