HtmlElement.Net
Public Member Functions | List of all members
HtmlElements.LazyLoad.LoaderFactory Class Reference

Creates caching loaders for WebElements and list of WebElements. More...

Inherits HtmlElements.LazyLoad.ILoaderFactory.

Public Member Functions

 LoaderFactory (IPageObjectFactory pageObjectFactory, IProxyFactory proxyFactory)
 Initializes a new instance of the LoaderFactory class. More...
 
ILoader< IWebElement > CreateElementLoader (ISearchContext searchContext, By locator, bool enableCache)
 Creates element loader using search context and locator to find WebElement. More...
 
ILoader< ReadOnlyCollection< IWebElement > > CreateElementListLoader (ISearchContext searchContext, By locator, bool enableCache)
 Creates element list loader using search context and locator to find list of elements. More...
 
object CreateListLoader (Type elementType, ISearchContext searchContext, By locator, bool enableCache)
 Create list loader wrapping web elements loader. More...
 
ILoader< IList< TElement > > CreateListLoader< TElement > (ISearchContext searchContext, By locator, bool enableCache)
 Create list loader wrapping web elements loader. More...
 

Detailed Description

Creates caching loaders for WebElements and list of WebElements.

See also
HtmlElements.LazyLoad.ILoaderFactory

Constructor & Destructor Documentation

◆ LoaderFactory()

HtmlElements.LazyLoad.LoaderFactory.LoaderFactory ( IPageObjectFactory  pageObjectFactory,
IProxyFactory  proxyFactory 
)

Initializes a new instance of the LoaderFactory class.

Parameters
pageObjectFactoryThe page object factory used for creating typed list items dynamically.
proxyFactoryThe proxy factory used for creating typed list items dynamically.

Member Function Documentation

◆ CreateElementListLoader()

ILoader<ReadOnlyCollection<IWebElement> > HtmlElements.LazyLoad.LoaderFactory.CreateElementListLoader ( ISearchContext  searchContext,
By  locator,
bool  enableCache 
)

Creates element list loader using search context and locator to find list of elements.

Parameters
searchContextWhere to search for web elements.
locatorHow to find a web elements.
enableCacheWhether elements should be cached once found.
Returns
Loader instance.

Implements HtmlElements.LazyLoad.ILoaderFactory.

◆ CreateElementLoader()

ILoader<IWebElement> HtmlElements.LazyLoad.LoaderFactory.CreateElementLoader ( ISearchContext  searchContext,
By  locator,
bool  enableCache 
)

Creates element loader using search context and locator to find WebElement.

Parameters
searchContextWhere to search for web element.
locatorHow to find a web element.
enableCacheWhether element should be cached once found.
Returns
Loader instance.

Implements HtmlElements.LazyLoad.ILoaderFactory.

◆ CreateListLoader()

object HtmlElements.LazyLoad.LoaderFactory.CreateListLoader ( Type  elementType,
ISearchContext  searchContext,
By  locator,
bool  enableCache 
)

Create list loader wrapping web elements loader.

Parameters
elementTypeType of list items.
searchContextWhere to search for web elements.
locatorHow to find a web elements.
enableCacheWhether elements should be cached once found.
Returns
Loader instance.

Implements HtmlElements.LazyLoad.ILoaderFactory.

◆ CreateListLoader< TElement >()

ILoader<IList<TElement> > HtmlElements.LazyLoad.LoaderFactory.CreateListLoader< TElement > ( ISearchContext  searchContext,
By  locator,
bool  enableCache 
)

Create list loader wrapping web elements loader.

Template Parameters
TElementType of list items.
Parameters
searchContextContext used to locate web elements.
locatorHow to find a web elements.
enableCacheWhether elements should be cached once found.
Returns
Loader instance.

Implements HtmlElements.LazyLoad.ILoaderFactory.