/// <summary>
        ///     Decorates the typified element.
        /// </summary>
        /// <param name="elementType">Type of the element.</param>
        /// <param name="locator">The locator.</param>
        /// <param name="elementName">Name of the element.</param>
        /// <returns>The value.</returns>
        private TypifiedElement DecorateTypifiedElement(Type elementType, IElementLocator locator, string elementName)
        {
            // Create typified element and initialize it with WebElement proxy
            var elementToWrap           = HtmlElementFactory.CreateNamedProxyForWebElement(locator, elementName);
            var typifiedElementInstance = HtmlElementFactory.CreateTypifiedElementInstance(elementType, elementToWrap);

            typifiedElementInstance.Name = elementName;
            return(typifiedElementInstance);
        }
        /// <summary>
        ///     Decorates the HTML element.
        /// </summary>
        /// <param name="elementType">Type of the element.</param>
        /// <param name="locator">The locator.</param>
        /// <param name="elementName">Name of the element.</param>
        /// <returns>The value.</returns>
        private HtmlElement DecorateHtmlElement(Type elementType, IElementLocator locator, string elementName)
        {
            // Create block and initialize it with WebElement proxy
            var elementToWrap       = HtmlElementFactory.CreateNamedProxyForWebElement(locator, elementName);
            var htmlElementInstance = HtmlElementFactory.CreateHtmlElementInstance(elementType);

            htmlElementInstance.WrappedElement = elementToWrap;
            htmlElementInstance.Name           = elementName;

            // Recursively initialize elements of the block
            PageFactory.InitElements(new HtmlElementDecorator(elementToWrap), htmlElementInstance);
            return(htmlElementInstance);
        }
 /// <summary>
 ///     Decorates the web element list.
 /// </summary>
 /// <param name="locator">The locator.</param>
 /// <param name="listName">Name of the list.</param>
 /// <returns>The value.</returns>
 private object DecorateWebElementList(IElementLocator locator, string listName)
 {
     return(HtmlElementFactory.CreateNamedProxyForWebElementList(locator, listName));
 }
 /// <summary>
 ///     Decorates the HTML element list.
 /// </summary>
 /// <param name="listType">Type of the list.</param>
 /// <param name="elementType">Type of the element.</param>
 /// <param name="locator">The locator.</param>
 /// <param name="listName">Name of the list.</param>
 /// <returns>The value.</returns>
 private object DecorateHtmlElementList(Type listType, Type elementType, IElementLocator locator, string listName)
 {
     return(HtmlElementFactory.CreateNamedProxyForHtmlElementList(listType, elementType, locator, listName));
 }
 /// <summary>
 ///     Decorates the web element.
 /// </summary>
 /// <param name="locator">The locator.</param>
 /// <param name="elementName">Name of the element.</param>
 /// <returns>The value.</returns>
 private IWebElement DecorateWebElement(IElementLocator locator, string elementName)
 {
     return(HtmlElementFactory.CreateNamedProxyForWebElement(locator, elementName));
 }