我是VS编码ui的新手,但仍在尝试了解其工作机制。编码的ui给出了超链接录制错误。找不到超长文本,没有id和名字的超链接。我不确定id和name是否对超链接而言是必需的,以便对ui进行编码。
我尝试评论innertex,但这会带来另一个错误,我认为必须包含它。
WebCodedUITestProject1.CodedUITest11.CodedUITestMethod1引发异常: Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException:回放未能找到具有给定搜索属性的控件。额外细节: 技术名称:“ Web” ControlType:“超链接” 标记名:“ A” ID: '' 名称: '' 目标:” InnerText:“
Raporlar
raporlarıiçingerekliayarlamalarınyapıldığıbölümdür。 ' 找不到与搜索条件Id =''&& Name =''&& ControlType ='Hyperlink'&& Target =“ && InnerText ='
匹配的任何控件此超链接的实际代码是这个
this.mUIRaporlarrapHyperlink = new HtmlHyperlink(this);
#region Search Criteria
this.mUIRaporlarrapHyperlink.SearchProperties[HtmlHyperlink.PropertyNames.Id] = null;
this.mUIRaporlarrapHyperlink.SearchProperties[HtmlHyperlink.PropertyNames.Name] = null;
this.mUIRaporlarrapHyperlink.SearchProperties[HtmlHyperlink.PropertyNames.Target] = null;
this.mUIRaporlarrapHyperlink.SearchProperties[HtmlHyperlink.PropertyNames.InnerText] = " \r\n\r\n\r\n\r\nRaporlar\r\n \r\n raporları için gerekli ayarlamaların yapıldığı bö" +
"lümdür. ";
this.mUIRaporlarrapHyperlink.FilterProperties[HtmlHyperlink.PropertyNames.AbsolutePath] = "/WebForms/Common/SubCategories.aspx";
this.mUIRaporlarrapHyperlink.FilterProperties[HtmlHyperlink.PropertyNames.Title] = null;
this.mUIRaporlarrapHyperlink.FilterProperties[HtmlHyperlink.PropertyNames.Href] = "http://10.1.7.58/WebForms/Common/SubCategories.aspx?Category=Reports";
this.mUIRaporlarrapHyperlink.FilterProperties[HtmlHyperlink.PropertyNames.Class] = null;
this.mUIRaporlarrapHyperlink.FilterProperties[HtmlHyperlink.PropertyNames.ControlDefinition] = "href=\"SubCategories.aspx?Category=Report";
this.mUIRaporlarrapHyperlink.FilterProperties[HtmlHyperlink.PropertyNames.TagInstance] = "9";
this.mUIRaporlarrapHyperlink.WindowTitles.Add(" | Üretim Yönetim Sistemi");