/// <summary>Collapses current TreeNode.</summary> /// <exception cref="ScContentEditorException">Element is not expanded</exception> public void Collapse() { if (CurrentState == State.Expanded) { Logger.Trace($"Collapsing {Name}"); NoteImageElement.Click(); } else { throw new ScContentEditorException("Element is not expanded"); } }
/// <summary>Expands the current TreeNode</summary> /// <param name="withException">if set to <c>true</c> [with exception].</param> /// <exception cref="ScContentEditorException">Element is not collapsed</exception> public void Expand(bool withException = true) { if (CurrentState == State.Collapsed) { Logger.Trace($"Expanding {Name}"); NoteImageElement.Click(); Driver.Wait(10, "Expanding time").Until(d => CurrentState != State.Loading); } else { if (withException) { throw new ScContentEditorException("Element is not collapsed"); } } }