Exemplo n.º 1
0
        private TypifiedElement DecorateTypifiedElement(Type elementType, IElementLocator locator, string elementName)
        {
            // Create typified element and initialize it with WebElement proxy
            IWebElement     elementToWrap           = HtmlElementFactory.CreateNamedProxyForWebElement(locator, elementName);
            TypifiedElement typifiedElementInstance = HtmlElementFactory.CreateTypifiedElementInstance(elementType, elementToWrap);

            typifiedElementInstance.Name = elementName;
            return(typifiedElementInstance);
        }
Exemplo n.º 2
0
        private HtmlElement DecorateHtmlElement(Type elementType, IElementLocator locator, string elementName)
        {
            // Create block and initialize it with WebElement proxy
            IWebElement elementToWrap       = HtmlElementFactory.CreateNamedProxyForWebElement(locator, elementName);
            HtmlElement htmlElementInstance = HtmlElementFactory.CreateHtmlElementInstance(elementType);

            htmlElementInstance.WrappedElement = elementToWrap;
            htmlElementInstance.Name           = elementName;
            // Recursively initialize elements of the block
            PageFactory.InitElements(new HtmlElementDecorator(elementToWrap), htmlElementInstance);
            return(htmlElementInstance);
        }
Exemplo n.º 3
0
 private IWebElement DecorateWebElement(IElementLocator locator, string elementName)
 {
     return(HtmlElementFactory.CreateNamedProxyForWebElement(locator, elementName));
 }