我想更新一些 HTML5 日期表单字段的日期值(显示为 mm/dd/yyyy,仅数字部分可修改):
<input type="date"/>
在我的 Selenium/Protractor 测试中。我尝试过使用sendKeys
为此,但(在 Chrome 上)到目前为止尚未成功。
有没有办法使用以下方法来做到这一点sendKeys
?或者还有其他方法可以做到吗?
在 Mac 上使用 Chrome 和量角器,以下方法对我有用。
模板(html5)
<input type="date" placeholder="Due Date" ng-model="newLesson.dueDate">
Test
this.newLessonDate = element( by.model('newLesson.dueDate') );
this.newLessonDate.sendKeys('01-30-2015');
我一直收到错误,直到我输入日期格式为“01-30-2015”。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)