private static TestCase ParseTestCase(TreeNode testNode) { TestCase testResult = new TestCase(); testNode.Get<Label>("TestListViewDisplayNameTextBlock").Click(); testNode.Nodes.Count.Should().Be(0, "Test case tree node expected to have no children."); SearchCriteria isControlTypeLabel = SearchCriteria.ByControlType(typeof(Label), WindowsFramework.Wpf); // ReSharper disable once PossibleInvalidCastExceptionInForeachLoop foreach (Label label in GetTestExplorerDetailsPanel().GetMultiple(isControlTypeLabel)) { if (label.IsOffScreen || string.IsNullOrWhiteSpace(label.Text)) continue; AddInfoFromDetailPane(testResult, label); } return testResult; }
private static void ClickNode(TreeNode node) { EnsureTestCaseNodeIsOnScreen(node); node.Get<Label>("TestListViewDisplayNameTextBlock").Click(); }