By Constructor (Func ISearchContext, IWebElement , Func ISearchContext, ReadOnlyCollection IWebElement  )WebDriver
Initializes a new instance of the By class using the given functions to find elements.

Namespace: OpenQA.Selenium
Assembly: WebDriver (in WebDriver.dll) Version: 2.35.0.0 (2.35.0.0)
Syntax

protected By(
	Func<ISearchContext, IWebElement> findElementMethod,
	Func<ISearchContext, ReadOnlyCollection<IWebElement>> findElementsMethod
)

Parameters

findElementMethod
Type: OnlineSystem Func ISearchContext, IWebElement 
A function that takes an object implementing ISearchContext and returns the found IWebElement.
findElementsMethod
Type: OnlineSystem Func ISearchContext, OnlineReadOnlyCollection IWebElement  
A function that takes an object implementing ISearchContext and returns a OnlineReadOnlyCollection T  of the foundIWebElements. IWebElements/>.
See Also