【问题标题】:How to select date and time from devextreme calendar if field is disable in cypress如果字段在赛普拉斯中被禁用,如何从 devextreme 日历中选择日期和时间
【发布时间】:2023-02-01 15:49:40
【问题描述】:

我想从 devextreme 数据时间小部件中选择日期和时间,并且此数据输入此字段的位置已锁定。

DevExtreme 日历日历控件 HTML时间控制 HTML

【问题讨论】:

  • 您能否添加一些有关您尝试过的内容和无效内容的信息?
  • 我想从此日期/时间小部件中选择日期和时间。

标签: cypress chai devextreme mochawesome


【解决方案1】:

表单上的每个时间值都有两个<input>

第一个是隐藏的,但具有值,请参见<input type="hidden" value="4">,第二个用于上/下控制,请参见<input inputmode="decimal"...

要直接更改值,请在隐藏的 <input> 上使用 force:true

cy.get('dx-timeview')
  .find('input:hidden')
  .type('6', {force:true})

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-10-04
    • 2019-09-13
    • 1970-01-01
    • 1970-01-01
    • 2022-01-07
    • 1970-01-01
    相关资源
    最近更新 更多