简体   繁体   English

如何使用TestComplete在Flex日期选择器中选择日期

[英]How to select a date in Flex datechooser using TestComplete

We are testing a Flex application using TestComplete Tool. 我们正在使用TestComplete工具测试Flex应用程序。 The tool is able to recognize all the fields inside the Flex application. 该工具能够识别Flex应用程序内的所有字段。 As part of this, we need to select dates (DateChooser object) for few of the fields in a Form. 在此过程中,我们需要为Form中的几个字段选择日期(DateChooser对象)。

Issue : We are selecting the date in the datechooser object by setting the "selectedDate" property. 问题 :我们通过设置“ selectedDate”属性在datechooser对象中选择日期。

fromDate.FlexObject.selectedDate = aqDateTime.Today fromDate.FlexObject.selectedDate = aqDateTime.Today

The selected date appears in the UI for the fromDate field.On submitting the form, we are getting error message as "fromDate field is empty". 所选日期出现在UI中的fromDate字段。提交表单时,我们收到错误消息,因为“ fromDate字段为空”。

Do we need to set any additional fields to register the selected date? 我们是否需要设置其他字段来注册所选日期?

We are using VBScript as scripting language in the Test Complete Tool. 我们在测试完成工具中使用VBScript作为脚本语言。

The problem is that a required event is not fired when the value is set programmatically (eg OnKeyPress or something like that). 问题在于,通过编程设置值时(例如OnKeyPress或类似的东西),不会触发必需事件。 You need to make your test type the date to the field in order to make this event work: 您需要在字段中输入测试日期,以使此事件生效:

fromDate.FlexObject.selectedDate.Keys "6/2/2014"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM