【发布时间】:2013-04-25 12:55:41
【问题描述】:
我使用编码的 UI 测试,但我遇到了问题。我想在edittext中输入日期,但它给出了错误消息,问题出在哪里,谢谢。
public void TheDate()
{
#region Variable Declarations
HtmlEdit uITxtDateEdit = this.UIEWindowWindow8.UIDemoSiteDocument.UITxtDateEdit;
#endregion
uITxtDateEdit.Text = DateTime.Now.AddMonths(4).ToString("dd/MM/yyyy");
}
无法在控件上执行“SetProperty of Text with value "16.08.2013"'。
其他细节:
技术名称:“网络” 控制类型:“编辑” 标签名称:'输入' ID:'ctl00_ctl00_ctl00_wpm1_gwpc1_c1_txtDepartureDate_txtDate' 名称:'ctl00$ctl00$ctl00$wpm1$gwpc1$c1$txtDepartureDate_txtDate'
【问题讨论】:
-
你可以尝试使用 Type-Function 而不是设置 text-properts
标签: c# visual-studio-2010 coded-ui-tests