python+appium,sendkeys输入不了内容,无论中文还是数字怎么办?
sendkeys其他输入框都能输入,只有这个不能输入,能够定位到输入框,能看得见光标显示了,无论是ID定位还是xpath定位最多也只是显示光标,有过一次手动输入几个字符后成功的输入进去了。贴代码#输入手机号
account_name = driver.find_element_by_id('com.eestar:id/edtPhone').send_keys("15512341234")
#输入验证码
password = driver.find_element_by_id('com.eestar:id/edtCode').send_keys("1111")
#点击登录
driver.find_element_by_id("com.eestar:id/txtLogin").click()
#点击首页唯一直播
driver.find_element_by_id("com.eestar:id/txtTitle").click()
#输入聊天内容
time.sleep(5)
#a = 123
driver.find_element_by_id("com.eestar:id/txtChat").send_keys("3369")
光标能显示到输入框中,当时最终还是报错,只有这个一个输入框这样,是什么情况呢?python报错信息: raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: UiSelectorappium提示信息: Attempting to clear using UiObject.clearText().
Returning result: {"status":7,"value":"UiSelector"}
Received command result from bootstrap
Matched JSONWP error code 7 to NoSuchElementError
Encountered internal error running command: NoSuchElementError: UiSelector
at errorFromMJSONWPStatusCode (C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:786:12)
at Socket. (C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\appium-android-driver\lib\bootstrap.js:139:18)
at Socket.emit (events.js:182:13)
at addChunk (_stream_readable.js:279:12)
at readableAddChunk (_stream_readable.js:260:13)
at Socket.Readable.push (_stream_readable.js:219:10)
at TCP.onread (net.js:636:20)
<-- POST /wd/hub/session/c4687604-09d8-4943-9e04-29703be054ca/element/8/value 404 24825 ms - 768
这个是视频缓冲 设置等待时间,等输入框元素出来之后再输入 这就不清楚了
页:
[1]