/// <summary>
        /// Gets the selection info from the actual UITestControl.
        /// </summary>
        /// <param name="uiTestControl">The UITestControl.</param>
        /// <returns>The selection info.</returns>
        private static WordSelectionInfo GetSelectionInfo(UITestControl uiTestControl)
        {
            // Get the Word selection range first.
            WordSelectionRange selectionRange = uiTestControl.GetProperty(UITestControl.PropertyNames.UITechnologyElement) as WordSelectionRange;

            if (selectionRange != null)
            {
                return(selectionRange.SelectionInfo);
            }

            return(null);
        }
        /// <summary>
        /// Determines whether the specified object is equal to the current object.
        /// </summary>
        /// <param name="element">The object to compare with the current object.</param>
        /// <returns>True if the specified object is equal to the current object; otherwise, false.</returns>
        public override bool Equals(IUITechnologyElement element)
        {
            if (base.Equals(element))
            {
                WordSelectionRange otherElement = element as WordSelectionRange;
                if (otherElement != null)
                {
                    return(this.SelectionInfo.Equals(otherElement.SelectionInfo));
                }
            }

            return(false);
        }