示例#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);
        }
示例#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);
        }
示例#3
0
 private object DecorateHtmlElementList(Type listType, Type elementType, IElementLocator locator, string listName)
 {
     return(HtmlElementFactory.CreateNamedProxyForHtmlElementList(listType, elementType, locator, listName));
 }
示例#4
0
 private object DecorateWebElementList(IElementLocator locator, string listName)
 {
     return(HtmlElementFactory.CreateNamedProxyForWebElementList(locator, listName));
 }
示例#5
0
 private IWebElement DecorateWebElement(IElementLocator locator, string elementName)
 {
     return(HtmlElementFactory.CreateNamedProxyForWebElement(locator, elementName));
 }