Testing 如何使用testcafe单击日历来模拟day.js

Testing 如何使用testcafe单击日历来模拟day.js,testing,automation,automated-tests,e2e-testing,testcafe,Testing,Automation,Automated Tests,E2e Testing,Testcafe,我尝试使用test cafe和今天的日期单击日历,我尝试使用moment获取日期格式,但无法单击日历,我使用selector with Text,它总是返回找不到选择器 例如 从“testcafe”导入{Selector}; fixture`选择日期` .第页`https://www.phila.gov/the-latest/archives//?templates=featured` 测试“选择日期”,异步t=>{ const dateInput=选择器'input[name=start]';

我尝试使用test cafe和今天的日期单击日历,我尝试使用moment获取日期格式,但无法单击日历,我使用selector with Text,它总是返回找不到选择器

例如

从“testcafe”导入{Selector}; fixture`选择日期` .第页`https://www.phila.gov/the-latest/archives//?templates=featured` 测试“选择日期”,异步t=>{ const dateInput=选择器'input[name=start]'; 等待 。单击日期输入 .clickdateInput.parent'.vdp datepicker'.find'.cell.day'.withText'2' .expectdateInput.value.eql'2020年5月2日'; };
请你澄清你的确切问题好吗?是“如何模拟库”、“如何单击日历”还是“为什么选择器不返回任何内容”?你用什么样的日历?你尝试过什么方法?您的测试代码是什么样子的?谢谢您的回复@Alex Skorkin如何单击日历是我的问题?开发人员使用day.js包装器,我尝试使用类,但它们具有动态值,并且无法识别选择器。//等待t。单击this.btnDate;所选var_日期=时刻;变量输出模式=dddd,MMMM D,YYYY;var todayDate=所选的\u date.formatoutput\u模式;等待t.expectthis.test.getAttribute'aria-label'.containstodayDate;等待t。单击this.test.withTexttodayDate;//另外,请发布一个示例,说明如何单击day.js抱歉,但是这些信息仍然不足以让我们看到这个问题。您能提供一个简单的示例或您正在使用的日历的公共链接吗?@Artem谢谢此url具有示例日期选择器,我没有使用类似的日期选择器,但我想知道它如何适用于此OneHank you@Artem