<test-case
name="Fiserv.QA.NewUI.Settings.ChangeAddressTelephoneNumber.ChangeAddress.Workflow.ChangeAddressTelephoneNumberTests.ChangeAddressFuncationality"
executed="True"
result="Success"
success="True"
time="102.315"
asserts="14">
我试过这个
dr[0] = node.SelectSingleNode("properties/property").Attributes["value"].Value;
dr[1] = node.Attributes["name"].Value;
dr[2] = node.Attributes["success"].Value;
但是它无法正确找到成功属性值并同时获取其名称。我想获取成功价值。有人可以告诉我吗?
答案 0 :(得分:1)
xml.Descendants("test-case").Select(e => e.Attribute("success").Value).ToList()
尝试类似上面的内容