将自动生成的代码从 UIMap.Designer.cs 复制到 UIMap.cs 后出现以下错误
'Test_7.UIReviewyourshoppingcaDocument.UIDJComboBox' 和 'Test_7.UIReviewyourshoppingcaDocument.UIDJComboBox' 之间的歧义
我在 codedUITestMethod 中的以下代码行中收到此错误-
Mouse.Click(this.UIMap.UIReviewyourshoppingcaWindow.UIReviewyourshoppingcaDocument.UIDJComboBox);
我想为我的编码 UI 测试创建自定义代码,但由于此错误,我无法这样做。
以下是我在 UIMap.cs 文件中移动的代码 -
public class UIReviewyourshoppingcaDocument : HtmlDocument
{
#region Properties
public HtmlComboBox UIDJComboBox
{
get
{
if ((this.mUIDJComboBox1 == null))
{
this.mUIDJComboBox1 = new HtmlComboBox(this);
#region Search Criteria
this.mUIDJComboBox1.SearchProperties[HtmlComboBox.PropertyNames.Name] = "DJ";
this.mUIDJComboBox1.FilterProperties[HtmlComboBox.PropertyNames.LabeledBy] = null;
this.mUIDJComboBox1.FilterProperties[HtmlComboBox.PropertyNames.Size] = "0";
this.mUIDJComboBox1.FilterProperties[HtmlComboBox.PropertyNames.Title] = "D J";
this.mUIDJComboBox1.FilterProperties[HtmlComboBox.PropertyNames.ItemCount] = "52";
this.mUIDJComboBox1.FilterProperties[HtmlComboBox.PropertyNames.Class] = "form-control control-width form-select DJ-required";
this.mUIDJComboBox1.FilterProperties[HtmlComboBox.PropertyNames.ControlDefinition] = "name=\"DJ\" title=\"Dms";
this.mUIDJComboBox1.FilterProperties[HtmlComboBox.PropertyNames.TagInstance] = "2";
this.mUIDJComboBox1.WindowTitles.Add("Review your shopping cart");
#endregion
}
return this.mUIDJComboBox1;
}
}
#endregion
#region Fields
private HtmlComboBox mUIDJComboBox1;
#endregion
}