driver.find_element_by_name("设置").click()
driver.find_element_by_id('com.lubansoft.iban:id/serverUrl').send_keys('http://be3.lubansoft.com/LBBE300/')

很奇怪为什么我上面 send_keys 的代码每执行一次, Sending plain text to element 中的数据就会累加一次?
输入用户名的 send_keys 就不会重复

下面是 appium 日志

info: --> POST /wd/hub/session/1f2ae336-d50f-4d33-ab68-547bb45018f9/element/3/value {"sessionId":"1f2ae336-d50f-4d33-ab68-547bb45018f9","id":"3","value":["h","t","t","p",":","/","/","b","e","3",".","l","u","b","a","n","s","o","f","t",".","c","o","m","/","L","B","B","E","3","0","0","/"]}
info: [debug] Pushing command to appium work queue: ["element:setText",{"elementId":"3","text":"http://be3.lubansoft.com/LBBE300/","replace":false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:setText","params":{"elementId":"3","text":"http://be3.lubansoft.com/LBBE300/","replace":false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: setText
info: [debug] [BOOTSTRAP] [debug] Attempting to clear using UiObject.clearText().
info: [debug] [BOOTSTRAP] [debug] Sending plain text to element: http://be3.lubansoft.com/LBBE300/http://be3.lubansoft.com/LBBE300/http://be3.lubansoft.com/LBBE300/http://be3.lubansoft.com/LBBE300/http://be3.lubansoft.com/LBBE300/


↙↙↙阅读原文可查看相关链接,并与作者交流