• <bdo id='upArY'></bdo><ul id='upArY'></ul>
    <i id='upArY'><tr id='upArY'><dt id='upArY'><q id='upArY'><span id='upArY'><b id='upArY'><form id='upArY'><ins id='upArY'></ins><ul id='upArY'></ul><sub id='upArY'></sub></form><legend id='upArY'></legend><bdo id='upArY'><pre id='upArY'><center id='upArY'></center></pre></bdo></b><th id='upArY'></th></span></q></dt></tr></i><div id='upArY'><tfoot id='upArY'></tfoot><dl id='upArY'><fieldset id='upArY'></fieldset></dl></div>

      <legend id='upArY'><style id='upArY'><dir id='upArY'><q id='upArY'></q></dir></style></legend>
        <tfoot id='upArY'></tfoot>

      1. <small id='upArY'></small><noframes id='upArY'>

      2. 如何设置 HTML5 type="date";使用 Selenium/Protractor 的输入字

        How to set HTML5 type=quot;datequot; input fields (e.g. in Chrome) using Selenium/Protractor?(如何设置 HTML5 type=date;使用 Selenium/Protractor 的输入字段(例如在 Chrome 中)?)

              <bdo id='RJDGp'></bdo><ul id='RJDGp'></ul>

                <tbody id='RJDGp'></tbody>
              <i id='RJDGp'><tr id='RJDGp'><dt id='RJDGp'><q id='RJDGp'><span id='RJDGp'><b id='RJDGp'><form id='RJDGp'><ins id='RJDGp'></ins><ul id='RJDGp'></ul><sub id='RJDGp'></sub></form><legend id='RJDGp'></legend><bdo id='RJDGp'><pre id='RJDGp'><center id='RJDGp'></center></pre></bdo></b><th id='RJDGp'></th></span></q></dt></tr></i><div id='RJDGp'><tfoot id='RJDGp'></tfoot><dl id='RJDGp'><fieldset id='RJDGp'></fieldset></dl></div>
            • <tfoot id='RJDGp'></tfoot>

                  <small id='RJDGp'></small><noframes id='RJDGp'>

                  <legend id='RJDGp'><style id='RJDGp'><dir id='RJDGp'><q id='RJDGp'></q></dir></style></legend>
                  本文介绍了如何设置 HTML5 type="date";使用 Selenium/Protractor 的输入字段(例如在 Chrome 中)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想更新一些 HTML5 日期表单字段的日期值(显示为 mm/dd/yyyy,仅数字部分可修改):

                  I want to update the date value (displayed as mm/dd/yyyy with only the number portions modifiable) of some HTML5 date form fields:

                  <input type="date"/>
                  

                  在我的 Selenium/Protractor 测试中.我已经尝试为此使用 sendKeys 但(在 Chrome 上)到目前为止还没有成功.

                  in my Selenium/Protractor tests. I've tried using sendKeys for this but (on Chrome) have not been successful so far.

                  有没有办法使用 sendKeys 做到这一点?还是有其他方法?

                  Is there a way to do this using sendKeys? Or some other way to do it?

                  推荐答案

                  在 Mac 上使用 Chrome 和 Protractor,以下方法对我有用.

                  Using Chrome on Mac with Protractor, the following approach has worked for me.

                  模板 (html5)

                  <input type="date" placeholder="Due Date" ng-model="newLesson.dueDate">
                  

                  测试

                  this.newLessonDate = element( by.model('newLesson.dueDate') );
                  this.newLessonDate.sendKeys('01-30-2015');
                  

                  在我输入日期格式为01-30-2015"之前,我一直收到错误.

                  I kept getting errors until I entered the date format as '01-30-2015'.

                  这篇关于如何设置 HTML5 type="date";使用 Selenium/Protractor 的输入字段(例如在 Chrome 中)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Protractor Check if Element Does Not Exist(量角器检查元素是否不存在)
                  Protractor e2e Tests Login Redirection(Protractor e2e 测试登录重定向)
                  Protractor browser.wait doesn#39;t wait(量角器 browser.wait 不等待)
                  how test separate environmental name with protractor conf js?(如何使用量角器 conf js 测试单独的环境名称?)
                  Protractor - Find all elements and loop length of found elements and click button(量角器 - 查找所有元素和找到的元素的循环长度并单击按钮)
                  Using CSS selectors instead of XPath locators when searching through siblings(搜索同级时使用 CSS 选择器而不是 XPath 定位器)
                    <tbody id='lVWVj'></tbody>
                  • <bdo id='lVWVj'></bdo><ul id='lVWVj'></ul>

                      <tfoot id='lVWVj'></tfoot>
                      <i id='lVWVj'><tr id='lVWVj'><dt id='lVWVj'><q id='lVWVj'><span id='lVWVj'><b id='lVWVj'><form id='lVWVj'><ins id='lVWVj'></ins><ul id='lVWVj'></ul><sub id='lVWVj'></sub></form><legend id='lVWVj'></legend><bdo id='lVWVj'><pre id='lVWVj'><center id='lVWVj'></center></pre></bdo></b><th id='lVWVj'></th></span></q></dt></tr></i><div id='lVWVj'><tfoot id='lVWVj'></tfoot><dl id='lVWVj'><fieldset id='lVWVj'></fieldset></dl></div>
                    1. <small id='lVWVj'></small><noframes id='lVWVj'>

                    2. <legend id='lVWVj'><style id='lVWVj'><dir id='lVWVj'><q id='lVWVj'></q></dir></style></legend>