问题描述
您好,
我想验证HtmlCell中的数据是否在Coded UI中排序。我不能让我的代码工作,我总是得到失败的消息与排序与否,有人可以帮助吗?谢谢。
var PartName = BOMWin.SearchFor< HtmlCell>(new {Class =" dgrid-cell dgrid-cell-padding dgrid-column- gridpartDesc field-gridpartDesc dgrid_wdt_8"});
UITestControlCollection PartNames = PartName.FindMatchingControls();
var PartNameIn =(string)PartName.GetProperty(HtmlCell.PropertyNames.InnerText);
var partSort = PartNames.OrderBy(x => PartNameIn.ToString());
Assert.IsTrue(partSort.ToString()。SequenceEqual(PartName.InnerText),"PartName Not Sort");
Hello,
I want to verify if the data in HtmlCell is sorted in Coded UI. I can't make my code work, I always get the failed message with sort or not, can someone please help? Thank you.
var PartName = BOMWin.SearchFor<HtmlCell>(new { Class = "dgrid-cell dgrid-cell-padding dgrid-column-gridpartDesc field-gridpartDesc dgrid_wdt_8" });
UITestControlCollection PartNames = PartName.FindMatchingControls();
var PartNameIn = (string)PartName.GetProperty(HtmlCell.PropertyNames.InnerText);
var partSort = PartNames.OrderBy(x => PartNameIn.ToString());
Assert.IsTrue(partSort.ToString().SequenceEqual(PartName.InnerText), "PartName Not Sort");
这篇关于验证编码UI中的排序数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!