// By default opens in isolation mode
        protected IEnumerator OpenChildTemplateContainerAsSubDocument(BuilderTestContextualMenuManager menu, string nameOfChildSubDocument, bool inPlace = false)
        {
            hierarchy.elementHierarchyView.ExpandAllItems();

            // Open child
            var childInHierarchy = BuilderTestsHelper.GetExplorerItemsWithName(hierarchy, nameOfChildSubDocument);

            Assert.NotZero(childInHierarchy.Count);

            // Simulate right click on child TemplateContainer
            yield return(UIETestEvents.Mouse.SimulateClick(childInHierarchy[0], MouseButton.RightMouse));

            Assert.That(menu.menuIsDisplayed, Is.True);

            DropdownMenuAction subdocumentClick;

            if (inPlace)
            {
                subdocumentClick = menu.FindMenuAction(BuilderConstants.ExplorerHierarchyPaneOpenSubDocumentInPlace);
            }
            else
            {
                subdocumentClick = menu.FindMenuAction(BuilderConstants.ExplorerHierarchyPaneOpenSubDocument);
            }

            Assert.That(subdocumentClick, Is.Not.Null);
            subdocumentClick.Execute();
        }
        protected IEnumerator ReturnToParentDocumentThroughEntryItem(BuilderTestContextualMenuManager menu, string parentString, string parentName = null)
        {
            // Go back to root document through 'entry' item context menu
            BuilderExplorerItem parentRoot;

            if (parentName != null)
            {
                parentRoot = BuilderTestsHelper.GetExplorerItemWithName(hierarchy, parentName);
            }
            else
            {
                parentRoot = BuilderTestsHelper.GetHeaderItem(hierarchy);
            }
            Assert.NotNull(parentRoot);
            yield return(UIETestEvents.Mouse.SimulateClick(parentRoot, MouseButton.RightMouse));

            Assert.That(menu.menuIsDisplayed, Is.True);

            var parentClick = menu.FindMenuAction(parentString);

            Assert.That(parentClick, Is.Not.Null);
            parentClick.Execute();
            yield return(UIETestHelpers.Pause(1));
        }