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