Example #1
0
                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;
                }
Example #2
0
 private static void ClickNode(TreeNode node)
 {
     EnsureTestCaseNodeIsOnScreen(node);
     node.Get<Label>("TestListViewDisplayNameTextBlock").Click();
 }