导航

send_keys () 参数不正确问题解决

Posted on 2017-07-31 23:51  Young哥哥  阅读(1036)  评论(1编辑  收藏  举报

python代码:

self.driver.find_element_by_id("com.chemao.certification.debug:id/et_car_vin").send_keys("11111111111111111")

pycharm提示错误:
selenium.common.exceptions.WebDriverException: Message: Parameters were incorrect. We wanted {"required":["value"]} and you sent ["text","value","id","sessionId"]
appium提示错误:

 

解决办法1:将send_keys 改为set_value() 亲测好用,比send_keys()的输入速度要快
解决办法2:selenium的版本降低,具体的解决办法见http://blog.163.com/lucia_gagaga/blog/static/2647680192016829744684/