Initializes a new instance of the By class using the given functions to find elements.
Namespace: OpenQA.SeleniumAssembly: 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:
System Func ISearchContext, IWebElement
A function that takes an object implementing ISearchContext and returns the found IWebElement.
- findElementsMethod
- Type:
System Func ISearchContext,
ReadOnlyCollection IWebElement
A function that takes an object implementing ISearchContext and returns aReadOnlyCollection T of the foundIWebElements. IWebElements/>.
See Also